Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The name of the environment will appear to the left of the command prompt so that you know what environment is currently active.

Code Block
# To run a python script using the loaded env
(gurobi-9.5.1) $ python nobel_prize.py

# To check what packages are installed in the loaded env
(gurobi-9.5.1) $ mamba list

Environments may also be activated with a full path, e.g.,

source activate /data/sciencelab/.conda/envs/pysci.

This capability makes /data (project-based storage) an ideal location for groups sharing python environments!

...

When using mamba to install packages or create environments, you may see errors related to opening files in /packages/apps/mamba. These errors are harmless. An example is shown below. Annotations are shown in cyan with a black background and cyan outline.

Always verify the Prefix: is pointing where you need it to before proceeding with an installation, but otherwise, errors and warnings made by mamba may be ignored.

It is also good practice to verify what is being installed as a new package, what existing packages are being modified, and what existing packages are being removed before proceeding with the install.

...

Example

Please

...

check here for a brief example: A Brief Example

Adding Packages to Public or Existing Environments

...

Code Block
$ module load mamba/latest
$ source activate <public_environment_name>
$ mamba env export --from-history --no-builds -n <public_environment_name> > /your/path/to/<public_environment_name>.yaml
$ source deactivate
$ mamba create -n <your_environment_name> python=3
$ mamba env updatecreate -n <your_environment_name> --file /your/path/to/<public_environment_name>.yaml

Line 3 above asks mamba to export the list of packages without the version numbers nor the hashes in this public environment, unless the version numbers were specified during the installation process of this public environment. If you wish to preserve all the version numbers, the --from-history and the --no-buildsflag should be removed. Note that some public environments are old, and some version conflicts may arise if you specify the version numbers in the .yaml file.

...

Code Block
$ module load mamba/latest
$ source activate <your_environment_name>
$ mamba install -c <channel> <packages>

Please review the screenshot of an example mamba install below before proceeding. Annotations are shown in cyan with a black background and cyan outline.

When using mamba to install packages or create environments, you may see errors related to opening files in /packages/apps/mamba. These errors are harmless. An example is shown below.

Always verify the Prefix: is pointing where you need it to before proceeding with an installation, but otherwise, errors and warnings made by mamba may be ignored.

It is also good practice to verify what is being installed as a new package, what existing packages are being modified, and what existing packages are being removed before proceeding with the install.

...

Using environments in Jupyter

...