Detailed guide to create Conda environments.

Umaiskhan
3 min readOct 2, 2023

--

Importance:

In development the first and most important step is to create environments that will store all the necessary libraries needed for that development. We will in this tutorial use examples for AI development.

Installation:

  1. Use your search engine to install anaconda distribution for your OS type, mine is Windows so i will download according to that. Link to download: https://www.anaconda.com/download

2. Once downloaded install it on your system.

3. Now to check if the Anaconda distribution is installed on your system or not, open command line or PowerShell. Type the following command

This will confirm that you have conda installed.

4. Now we need to create an environment for this type commands

This will create an environment by the name (myenv) with python 3.10 version. After a few minutes this will install necessary packages like vsruntime etc.

5. Once we create our environment we need to activate it to perform actions like installing packages in that environment. For this type following

How would you no if environment is activated?

If you see (myenv) at the beginning or any of your environment then we know it is activated.

6. There are many ways to install packages, first one is conda install (package name).

Sometimes the packages will not be installed due to dependency issues or some other issue so for this we need to install packages directly from Anaconda Navigator.

In the search bar type Anaconda Navigator and open it.

Once opened click on your environment name and on the right side it will all the installed libraries in that environment.

To install a package/library type the name of library in search bar, tick mark the name and click on Apply below to install it.

7. Now to check what packages are installed you can type:

This will show all the packages installed including the one you installed from Anaconda Navigator.

8. You can also check all your environments by typing (conda env list)

9. So if you want to delete an environment you need to first deactivate by

This will remove and delete your environment.

--

--