4. Creating New Environments#
A new conda environment can be created with create
, and you can specifiy the version of python!
NAME
is the conda environment nameVERSION
is the version number of python
conda create -n NAME
conda create -n NAME python=VERSION
4.1. Running the new environment.#
conda activate <name>
In your new activated environment, you can now install needed packages.
conda install <package-name> # Install Package
conda install -c conda-forge <package-name> # Install package from a specific channel (-c)
4.2. Leaving Environment#
Use deactivate
if you want to leave or switch to a different conda environment
conda deactivate
4.4. List available environments.#
conda env list
4.5. List packages within an environment.#
conda activate <name>
conda list
4.6. Exporting environments to a YML file.#
conda activate <name>
conda env export > <name>.yml
4.7. Installing a Conda environment from a YML file.#
conda env create -f <name>.yml