From Conda 4.4 onward, it’s
to NOT simply add the Anaconda
bin directory to your PATH, as this can cause library version conflicts.
It’s much more appropriate, speedy and effective to follow this setup (for Linux and MacOS).
~/.bashrc, do NOT “export PATH” with anaconda/bin anymore.
~/.bashrc, add a line like:
After that, new terminal sessions will not have Anaconda/Conda etc. on the PATH. Be sure the old PATH for anaconda/bin or miniconda/bin isn’t there anymore–but leave other “export PATH” statements alone. 2. To add the Python / Conda executable path, type:
To avoid doing the second step constantly, setup a
custom keyboard shortcut
pointing to a executable script
~/pyterm.sh that contains something like (as appropriate for your system):
#!/bin/bash source $HOME/miniconda3/etc/profile.d/conda.sh conda activate base bash
the keyboard shortcut on Linux should call
x-terminal-emulator -e $HOME/pyterm.sh
and then you can typically use the new keyboard shortcut when you want to use Python, and your old keyboard shortcut when you don’t want Anaconda interfering with your system environment.