Skip to content Skip to sidebar Skip to footer

How To Set Up Anaconda So That It Doesn't Affect Other Environments Like 'homebrew Python Pip' And Pyenv On Macos?

It is well known that Anaconda installation on macOS can cause trouble with other widely used package/environment managers like Homebrew, Pyenv, Virtualenv, etc. The majority of th

Solution 1:

Rather than using Anaconda I would suggest using Miniconda, which includes only Python and conda (and a few support packages). Miniconda does not include all of the packages in Anaconda by default, but they can all be installed (with conda install anaconda). Once you download Miniconda, you can install it into your home folder at /Users/username/miniconda3. During the installation, you will be asked if you want to add some initialization code to your .bash_profile. Either choose yes or (if you chose no), then you can run

/Users/username/miniconda3/bin/conda init

to add the conda initialization to your .bash_profile. By default, this will activate the base environment, so you can change the default setting so the environment is not activated by default:

conda config --set auto_activate_base false

You'll probably need to open a new terminal so the conda command is available. Then, when you want to use a conda environment, you can conda activate that environment, but otherwise, conda's Python should not be on your PATH.

Post a Comment for "How To Set Up Anaconda So That It Doesn't Affect Other Environments Like 'homebrew Python Pip' And Pyenv On Macos?"