Note some frustrations with using Conda.
Install
$ mkdir -p ~/miniconda3
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
$ bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
$ rm ~/miniconda3/miniconda.sh
$ cd ~/miniconda3/bin
$ ./conda init bash
- reopen terminal or relogin or
source ~/.bashrc
$ which python3
# should be ~/miniconda3/bin/python3 not /usr/bin/python3
Create a clean environment
Bad: the environment (python, pip) is reused from the [base]
$ conda create -n xxx
Good: a new, clean environment is created
$ conda create -n xxx python=3.12
If the created environment still shows unresolved packages in pip list
, it may be due to the user’s local packages. You can backup or delete them.
# in the `base` environment
$ pip list --user
$ mv ~/.local ~/local_backup # backup the local packages
# or
$ rm -rf ~/.local # remove all loacl packages