Conda environment 101

Sophia Yang, Ph.D.
3 min readMay 8, 2019

Conda is an open source package management and environment management tool for Python and other languages. Whenever you use Python, you will be working in a Python environment, which contains the specific Python version you are running on and various Python packages with specific package versions and specifications.

If you use Anaconda or Miniconda, you can easily use Conda to manage your Python environment. To see which environment you are currently on, run:

conda env list 

It always starts with the base environment, which could be /anaconda3 or /miniconda. For Anaconda users, your base environment will include a bunch of data science packages preinstalled, which is super handy and ready to use. However, it is recommended to always create and use your own environment and don’t use the base environment. I learned this lesson the hard way. If you break your base environment, you won’t be able to remove your base environment and you will have to uninstall and reinstall Anaconda/Miniconda completely. In addition, different projects requires different packages and versions of packages. To avoid such environment conflicts, we can just create different conda environment for different projects by running the following:

conda create --name myenv

--

--

No responses yet