Python Common Issues
-
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 -
Avoid installing any packages in the
baseenvironment. If(base)shows in your prompt, deactivate this environment.(base) [rcsparky@login01:~]$
(base) [rcsparky@login01:~]$ source deactivate
[rcsparky@login01:~]$ -
Improper use of the
condacommands will inject some code into your~/.bashrcfile, which will cause problems. To remove these lines:$ remove_conda_from_bashrc
$ source ~/.bashrc -
Improper use of the
pip installcommands 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 -
How to remove an env:
$ interactive -t 60 -p htc
$ module load mamba/latest
$ mamba remove -n ENV_NAME --all
$ mamba clean --all