conda commands

Dul’s Blog
2 min readDec 17, 2020

conda commands in one tutorial

Please have conda installed yet to computer.

When I was working on Windows I could install mysql, mariaDB, and work with all. Lately in my ubuntu environment I installed mysql first. Then I got a project to work with mariaDB. Then i had to uninstall mysql to install mariaDB. So the best option was conda environment. I could keep mysql and mariaDB on the same computer yet with no issues. In one conda environment I made, there was installed mysql, on the other environment was installed mariaDB.

No issues not only for ubuntu users, but anyone searching for a virtual conda is the best solution. Say you have installed python 3.7, and for one project needed python 3.6, conda is the best solution.

Lets first see if any environments already there inside your conda. If this is the first time you have installed conda.The only environment you should have is base.

conda env list

I have about four environments previously created so I get those environment names listed.

Lets first create a conda environment called my_env. To that environment I m installing python version 3.6.3. You can install a python version as required for your project. To get the python libraries required for Machine learning and Data science. Most of the libraries are installed pandas, numpy, scikit, seaborn and matplotlib along with some essentials you might need as flask and pip.

conda create -n my_env python=3.6.3 anaconda

Say you want to create a blank environment.Use these code

conda create --name blank_env

Then a conda list should display no software.

Yet we only created the environment, and we are still not inside the created environment but we are in the base or default environment. That default means what is the normal environment of our computer, and it has the programs we have installed on it.

Lets activate the environment.

conda activate my_env

Now let’s see all the programs in your newly created virtual environment

conda list

Now let’s install pip on our virtual environment

conda install pip

Now lets install pandas

conda install -c anaconda pandas

Now let’s install postgreSQL

conda install -y -c conda-forge postgresql

Let’s install tflearn

pip install tflearn

Let’s install tensorflow

pip install tensorflow

To exit out of the working conda environment and go to default or your base.

conda deactivate

Now say you want to remove that environment in conda,

conda env remove -n blank_env

Now do a conda env list, and the environment blank_env should be removed.

Have fun coding….

--

--