Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to isolate Anaconda from system python without set the shell path

I want to install Anaconda locally on my home directory ~/.Anaconda3 (Archlinux) and without setting the path in the shell because I like to keep my system python as the default.

So I like to launch the Spyder (or other Anaconda's app) as isolated app from system binaries. I mean when I launch for example .Anaconda3/bin/spyder it launches spyder and this app uses Anaconda's binaries but when I use python ThisScript.py in my shell it uses system python installed from packages (e.g. /bin/python).

I managed to update the anaconda using .Anaconda3/bin/conda update --all in my shell without setting the Anaconda's binaries path (.Anaconda/bin/) but thsi way run some apps like spyder doesn't work obviously.

like image 669
SddS Avatar asked Aug 21 '26 21:08

SddS


1 Answers

You could use virtualenv

1) create a virtual env using the python version you need for anaconda virtualenv -p /usr/bin/pythonX.X ~/my_virtual_env

2) virtualenv ~/my_virtual_env/bin/activate

3) Run anaconda, then deactivate


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!