Documentation

Adding additional packages to Jupyter Notebooks

Google the desired package (python, R packages, not OS packages) and review the installation instructions.  They might recommend a different conda repository than the default.
Be careful if conda says it wants to downgrade packages.  If it is a minor downgrade, it is probably OK.  Do not proceed if many packages must be downgraded or critical packages are to be downgraded.  Remember that changes to the Ananconda environment will affect all tools using the environment and a downgrade could cause tools not to function (if a feature is no longer available, for example). 

 

  • Start a Workspace
  • From the terminal in the Workspace switch to the Apps user (your account must be a member of the apps group in the CMS).
    • sudo su - apps
  • Load the Anaconda environment that you will to modify (there may be multiple Anaconda environments available.  execute the command "use" from the terminal for a list)
    • use anaconda3-5.1
  • Install the desired package via 'conda'.  'conda' is preferred over 'pip'.
    • conda install <pkgname>
    • conda install -c conda-forge <pkgname>
  • The installation may take a few minutes
  • Important! Fix any world writable files by doing:
    • chmod -R o-w /apps/share64/debian7/anaconda

 

If the desired package isn't available in conda or there are issues, you can try pip.  Use the following command.

pip install -U --upgrade-strategy only-if-needed <pkgname>

 

Creating a separate anaconda environment.

#load the anaconda3-5.1 environment
conda create -n <environame> # create the <environame> environment
source activate <environame>  # enter the <environame> environment
conda install <packagename>  # install <packagename> and its dependencies
conda deactivate  # exit the <environame> environment

Create environ.d file for <environame> environment.  Users must load the anaconda3-5.1 environment first and the <environame> environment.

Reference:

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

Updating hublib


sudo su - apps
use anaconda3-5.1
pip install -U hublib

Last modified: