How to install 3. Party library into anaconda if it is not in conda list
Question: I have a general problem about module importation. Thank you very much.

The situation is the following:

  1. I have a python compressed package *****.tar.gz
  2. This package can not be found in conda list
  3. if I uncompressed it and use 'python setup.py install' package do would be installed into system python namely user/local/lib/python 2.7/site-packages, but anaconda distribution, which causes a problem that if I start python in anaconda distribution this installed package can not be accessed to.

So is there any direct solution to this problem?

Secondly, I am confused what's the difference between ~anaconda/env and
virtualenv

thank you very much


Answer: You should use pip to do this: `pip install <path_to_file>`.

Alternatively, if your package is available on PyPi - you can just do a `pip
install <packagename>` (do a `pip search <packagename>` to see if its on pypi.

For instance, I wanted to install pymongo - was easy - `pip install pymongo`.

Caveat:

I installed anaconda as root into /opt/anaconda - so, I had so `sudo su`, the
add /opt/anaconda/bin to the start of PATH, then run `pip install pymongo` so
that it would install the package into the anaconda dist, and not the existing
ubuntu python dist.

