1.12. 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
1.12.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)
1.12.2. Leaving Environment#
Use deactivate
if you want to leave or switch to a different conda environment
conda deactivate
1.12.4. List available environments.#
conda env list
1.12.5. List packages within an environment.#
conda activate <name>
conda list
1.12.6. Exporting environments to a YML file.#
conda activate <name>
conda env export > <name>.yml
1.12.7. Installing a Conda environment from a YML file.#
conda env create -f <name>.yml