Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install python packages to correct anaconda environment

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.

like image 480
Andreas Dolk Avatar asked Mar 10 '14 22:03

Andreas Dolk


People also ask

How do I install packages in Anaconda environment?

Go to Environments tab just below the Home tab and from there we can check what all packages are installed and what is not. It is very easy to install any package through anaconda navigator, simply search the required package, select package and click on apply to install it.

Does conda install packages for each environment?

To automatically add default packages to each new environment that you create: Open Anaconda Prompt or terminal and run: conda config --add create_default_packages PACKAGENAME1 PACKAGENAME2. Now, you can create new environments and the default packages will be installed in all of them.

Can I do pip install in conda environment?

While still in beta, conda 4.6. 0 allows conda to consider pip installed packages and either replace these packages as needed or fulfill dependencies with the existing package.


1 Answers

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/ 
like image 80
user545424 Avatar answered Sep 21 '22 22:09

user545424