Scripting & environments#
Python#
python3 -m venv <venv_name>
source venv_name/bin/activate
conda#
Search and find packages#
conda search <package_name>
All packages are listed here
Installing and removing packages#
Install packages with
conda install <package_name>
or from a specific channel with:
conda install --channel <channel_name> <package_name>
Install package in a specific environment:
conda install --name <env_name> <package_name>
Installed packages in current environment#
conda list
Install directly from PyPI#
In an active conda environment you can install PyPI packages using pip as normal
pip install <package_name>
Create and delete environment#
See available environments with:
conda env list
or
conda info --envs
and activate with
conda activate <env_name>
Creating a new environment with:
conda create --name <env_name>
or with a specific python version:
conda create --name <env_name> python=3.8
Delete environment with:
conda env remove --name <env_name>
Create and delete env to directory/path#
Simple enough, replace --name
with --prefix
.
conda env create --prefix /path/to/new/conda_env
cond env remove --prefix /path/to/new/conda_env