How to create a virtual environment
Each project that you’re working on may require different versions of software and libraries. Creating a virtual environment (think of it as a separate container) for each project makes it easier to control the dependencies for that project, and ensures that other projects with different requirements do not break.
The following can be used to create a virtual environment using Anaconda prompt:
See a list of all available virtual environments
1
conda env list
Create a new virtual environment
1
conda create --name name_of_environment
Activate virtual environment
1
conda activate name_of_environment
Add the environment to Jupyter Notebook
1
2
3
pip install ipykernel
python -m ipykernel install --name=myenv
Remove a virtual environment
1
conda env remove -n name_of_environment
Uninstall Jupyter Notebook kernel
1
jupyter kernelspec uninstall myenv
Congratuations on working with your virtual environment!