Installing Software in OpenScienceLab
pip
What is pip?
pip is a package installer for Python.
You can install pip
packages onto your account in the following manner:
NB: Your installed pip
packages are in the /home/jovyan/.local/lib/python3.x/site-packages
directory.
- Open a terminal and use the following command:
python -m pip install --user <package_name>
Install pip
package inside of a conda environment
- Open a terminal and use the following commands:
conda activate <environment_name>
python -m pip install --user <package_name>
mamba
Users can install additional software with mamba
in OpenScienceLab.
NB: OpenScienceLab began using mamba
instead of conda
to install conda packages in 2022. Since the syntax for mamba
is identical to conda
syntax, users who used conda
previously should be familiar with the mamba
workflow. Nonetheless, it is still worthwhile to reference conda
documentation due to its similarity.
Packages installed in the base conda environment will not stay after the server shuts down. You will need to reinstall it during subsequent OpenScienceLab sessions. However, changes to non-base
will persist. Therefore, we recommend installing new packages in your non-base
environments rather than in the base
.
Install conda packages within a running notebook
- Edit a notebook code cell
- Then use the following command:
%mamba install <package_name>
- Then use the following command:
- Run the code cell
Install conda packages from the terminal
- Open a terminal and use following command:
mamba activate <environment_name>
mamba install <package_name>
apt
and apt-get
At this time, users cannot install software in OpenScienceLab using apt
or apt-get
.