2.3.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
::::{tab-set}
:::{tab-item} New Environment
:::{code} bash
conda create -n NAME
:::
:::{tab-item} env w/ python verion
conda create -n NAME python=VERSION
:::
::::
2.3.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)
2.3.12.2. Leaving Environment#
Use deactivate
if you want to leave or switch to a different conda environment
:::{code} bash conda deactivate :::
2.3.12.4. List available environments.#
conda env list
2.3.12.5. List packages within an environment.#
conda activate <name>
conda list
2.3.12.6. Exporting environments to a YML file.#
conda activate <name>
conda env export > <name>.yml
2.3.12.7. Installing a Conda environment from a YML file.#
conda env create -f <name>.yml