Skip to main content

Python Common Issues

  1. Do not install packages on the login nodes or inside a Jupyter Notebook. It has to be done in a terminal/shell:

    $ interactive -t 30 -p htc
    $ ml mamba
  2. Avoid installing any packages in the base environment. If (base) shows in your prompt, deactivate this environment.

    (base) [rcsparky@login01:~]$
    (base) [rcsparky@login01:~]$ source deactivate
    [rcsparky@login01:~]$
  3. Improper use of the conda commands will inject some code into your ~/.bashrc file, which will cause problems. To remove these lines:

    $ remove_conda_from_bashrc
    $ source ~/.bashrc
  4. Improper use of the pip install commands will create a hidden cache folder, which usually breaks Python-related functions. To check and remove such folders:

    $ cd ~/.local/lib
    $ ls
    $ rm -rf python3*
    $ mamba clean --all
  5. How to remove an env:

    $ interactive -t 60 -p htc
    $ module load mamba/latest
    $ mamba remove -n ENV_NAME --all
    $ mamba clean --all