So you are working on a Deep Learning Project and while installing few libraries you are getting conflicting error because same library is installed with different version. Hers comes the role of virtual environment.
Creating a virtual environment gives us a great flexibility to work with different versions of python or other libraries on same machine. This is also an advisable way as we exactly know what environment we need to run our application, when we transfer our code to different machine.
Here we will discuss all the commands required to create and delete the virtual environment.Steps Involved :
1) Create virtual environment.
conda create -n DeepLearningEnv python=3.6
Where DeepLearningEnv is the name of the virtual environment and python= is the version of python you want to install in virtual environment.
2) Activate the virtual environment to use it.
conda activate DeepLearningEnv
3) Deactivate virtual environment once you are done using it.
conda deactivate
4) To check the list of virtual environment available.
conda env list
5) To delete any virtual environment.
conda env remove -n DeepLearningEnv
In this article we discussed how to create virtual environment using conda commands. Now create different environment for different projects and focus more on work instead of fixing the environment compatibility issues.
See you in the next article, till then keep learning, keep creating virtual environments.
Comments
Post a Comment