I have recently installed the Anaconda distribution of Python. I then inserted the following line into my .bashrc
file:
export PATH=/home/karnivaurus/Libraries/Anaconda/bin:$PATH
So, there are now two python
binary files: one in /usr/bin/
, and one in /home/karnivaurus/Libraries/Anaconda/bin
.
I also have a python script, which attempts to import a module named caffe
, with the line import caffe
. Now, if I run python caffe
from the terminal, the script runs fine. However, if I open the script in PyCharm, and set the interpreter to be /home/karnivaurus/Libraries/Anaconda/bin/python
, I get the following error:
ImportError: No module named caffe
Based on all this, I have two questions....
If I run the
python
command from the terminal, which binary file would it execute? The one in/usr/bin
, or the one in/home/karnivaurus/Libraries/Anaconda/bin
? My intuition is that it runs the first one, due to the discrepancy in behaviour with PyCharm. In that case, how can I force my system to use the Anaconda version?If I install a new package, for example
pip install caffe
, then where will it be installed to? Will it be installed to/usr/local/lib/python2.7/site-packages
, or to/home/karnivaurus/Libraries/Anaconda/pkgs
? How can I be sure that mypython
command will know where to find the new package?
Thank you!