Things under legendu
conda and executables installed by conda might not be able to run by sudo directly. If this happends, use the full path of the executable or add the option
-E "PATH=$PATH"to sudo.:::bash sudo -E env "PATH=$PATH" <command> [arguments]By defaut, conda installs things into /opt/conda.
Download Archives¶
https://
https://
Conda Environment¶
https://
Create a Conda Virtual Environment¶
Create a conda virtual environment with Python 3.7, numpy, pandas and scikit-learn installed.
:::bash
conda create -n myenv python=3.7 numpy pandas scikit-learnCreate a conda virtual environment from a YAML configuration file.
:::bash
conda env create -n myenv --file myenv.ymlIf you have issues creating a conda virtual environment
(e.g., due to package not found in the current conda channel),
you can create a bare conda virtual environment,
install pip into the environment
and then use pip to install the needed packages.
For example,
the below code creates a conda virtual environment
with the Python package optimuspyspark installed.
:::bash
conda create -n optimus
conda activate optimus
conda install pip
pip install optimuspysparkBe careful though,
as pip in a virtual environment sometimes installs packages into global location rather than your virtual environment.
This won’t affect usage of your virtual environment locally,
generally speaking.
However,
if you want to package your virtual environemnt using conda-pack
and use it somewhere else,
the Python packages installed outside the virtual environemnt won’t be packed.
Make sure to use conda list -n env_name
to check that the Python packages are installed into the virtual environment
before you pack it using conda-pack.
If the issue appears,
you can always manually specify the installation location for pip.
Activate a Conda Virtual Environment¶
:::bash
conda activate myenvPack a Conda Virtual Environment¶
A conda virtual environment can be packed
(conda-pack required)
into a tar.gz file
and be used on other machines with the same type of OS.
Notice that all packages in a conda virtual environment
must be managed by conda (rather than pip)
so that it can be packed by conda-pack.
:::bash
conda pack -n myenv -o myenv.tar.gzDeactivate a Conda Environment¶
:::bash
conda deactivate myenvRemove a Conda Environment¶
:::bash
conda env remove -n myenvAdministering a multi-user conda installation¶
https://
My Conda Packages¶
https://
References¶
https://
https://
https://