Conda is a powerful package manager for managing environments and dependencies in Python and other languages. Conda keeps your projects organized and avoids conflicts.
Here’s a quick reference guide to get you started: (1) conda basics, (2) environment management and (3) package management.
1 Conda Basics
- Verify conda is installed, check version number:
conda info
- Command line help:
conda create --help # get the info of the command "create"
- Show version information for the current active Python:
python --version
- Show the locations of all versions of Python currently in the path (NOTE: The first version of Python in the list will be executed):
where python # Windows
which -a python # Linux, macOS
- Run an installed package such as Jupyter Notebook:
jupyter-notebook
2 Environment Management
- Create a new environment:
conda create -n myenv # Create environment "myenv"
conda create -n myenv python=3.8 # Create environment "myenv" with Python 3.8
- Create an environment from a saved environment:
conda myenv create --file saved_env.txt
- Clone an environment:
conda create --clone…