Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make "conda" installer look for "PyPi" packages

I was trying to use conda package manager to install my Python packages. Recently I encountered that many of the packages that I required were not present in the Anaconda.org repository, and I had to pip install them. Ref: github issues

Is there a way to add a channel to Anaconda that will enable it to look for All PyPi packages so that I can use "conda" completely instead of switching over to pip every now and then

like image 789
Senthil Kumaran Avatar asked Jul 05 '16 18:07

Senthil Kumaran


People also ask

Can conda install PyPI packages?

If you want to build conda packages for PyPI packages, the recommended way is to use conda skeleton pypi package and use conda build package on the recipe that it creates. To install the package, use conda install --use-local package (here and elsewhere, package is the name of the PyPI package you wish to install).

Does conda see pip packages?

To gain the benefits of conda integration, be sure to install pip inside the currently active conda environment and then install packages with that instance of pip. The command conda list shows packages installed this way, with a label showing that they were installed with pip.

How do I see pip installed packages in conda environment?

Use pip installed with conda , e.g. ~/anaconda/bin/pip . Use it to install packages into a conda environment, as well as to see the union of packages installed with this pip and with conda install .


1 Answers

According to conda skeleton, you can first run

conda skeleton pypi package

It will generate conda recipe for that package if it is available on PyPi, then

conda build package
conda install --use-local package 

It will install the package

Enjoy !

like image 59
Tian Zhang Avatar answered Oct 11 '22 04:10

Tian Zhang