Python/Conda
User-space python installation.
A lot of libraries for machine learning (scikit-learn), numerical computing (numpy, scipy), and data visualization (matplotlib, pandas, seaborn) are available in the form of python packages.
We keep the default 'base' environment slim, created system-wide conda environments and installed the following frameworks, shown below with (env_name):: packages format
torch :: latest stable GPU-enabled torch, torchaudio, torchvision, and torchtext
tf-keras-jax :: latest stable GPU-enabled tensorflow 2, keras, and jax
You can activate these global environments with
While pip
let's you easily install new packages, it doesn't fully account for their dependencies which may result in malfunctionings or unreplicable results. Therefore, we use conda;
a package and environment manager to create and maintain multiple development environments at the same time.
Some packages may not exist in conda; as a last resort, you can then use pip from within the conda environment:
If absolutely needed, you can create a new environment called <ENV_NAME>
at your user space, by
You can then activate the environment by running:
You will know that the environment is active because its name will appear between parentheses at the beginning of the command prompt. Once an environment is active, you can access all the python packages installed within. You can also use the command above to switch between existing environments.
By default, Conda environments are stored in the user’s home directory ($HOME/.conda/envs/
).
In order to install the custom package <PACKAGE_NAME>
within the environment, make sure the environment is active then type:
You can search for python packages on this repository, which also contains detailed instruction on how to install most packages.
Other commands
Update conda:
Update a package in the environment:
Remove a package from the environment:
List environments:
List packages inside current environment:
Delete environment:
The following commands can be used to share environments.
Export environment into
.yml
file:Create environment from
.yml
file:
For more commands, refer to this page.
Last updated