Install python packages to correct anaconda environment

Andreas Dolk picture Andreas Dolk · Mar 10, 2014 · Viewed 44.5k times · Source

I've setup anaconda and created a python 3.3 environment. Now I wanted to install some package (dataset). The install instructions ask to clone the git repo and run

python setup.py install

but now the packages are not installed to the environments site-packages folder but to a different anaconda location.

What are the normal steps to solve that problem? Newbie-compatible solutions are preferred. The OS is MacOSX, just is case, it is relevant.

Answer

user545424 picture user545424 · Mar 10, 2014

It looks like conda automatically adds pip to your conda environment, so after you source your conda environment, i.e.:

source activate ~/anaconda/envs/dataset

you should be able to install it like this:

git clone git://github.com/pudo/dataset.git
pip install ./dataset

EDIT

Here are the exact steps I took:

$ conda create -p ~/anaconda/envs/py33 python=3.3 anaconda pip
$ source activate ~/anaconda/envs/py33
$ which pip
~/anaconda/envs/py33/bin/pip
$ pip install ./dataset/