My system has a set-up python environment (2.7) to work with certain programs, and I also want to install Miniconda3 for Python 3.6.
When I call python
in terminal, it will start the system python from /usr/bin/python
. To achieve this, I removed the python
symbolic link in ~/miniconda/bin/
.
Now, when I execute conda
in terminal, it gives me the following error,
-bash: /home/me/miniconda/bin/conda: /home/me/miniconda/bin/python: bad interpreter: No such file or directory
I understand that this is because I remove the anaconda python symbolic link. But is there a way to hack anaconda to use ~/miniconda/bin/python3
as its python interpreter?
Advertisement
Answer
Solution
I don’t have to delete python
symbolic link in ~/miniconda/bin/
, and instead, in the ~/.bashrc
file, I need to change my conda path to
export PATH=$PATH:/home/me/miniconda/bin
After doing this, when I call python
, it’s actually executing the python
program in /usr/bin/
. conda
command will execute ~/miniconda/bin/conda
program.