pip
supports specifying additional repositories to look for packages; these behave similarly to channels in conda<4
. Example:
$ pip install somepkg --extra-index-url http://myindex.org
Multiple additional indexes can be specified in pip.conf
:
[global]
extra-index-url=
http://myindex.org
http://other-index.org
http://third-index.org
When an index is provided via extra-index-url
, pip
will always search the default index at https://pypi.org, then the extra index and install the first matching package. Overriding http://pypi.org is also possible, via
$ pip install --index-url http://myindex.org
hosting a local index
It's actually pretty easy to host a local index if you need one. Although there are a lot of third-party PyPI servers available (to name a few: devpi
, wheelhouse
or pypiserver
), you need nothing besides a Python installation to fire up one yourself. Create a directory with subdirs named same as packages and containing the installation files:
repo
└── MyPackage
└── MyPackage.tar.gz
Navigate to the directory and run the stdlib's server:
$ cd repo/
$ python -m SimpleHTTPServer 9000
Now you can install the packages from your local repository:
$ pip install MyPackage --extra-index-url = http://127.0.0.1:9000/
This is very very probably the answer, but how could I find the url for the channels used by anaconda? For instance, there is the
intel
channel (and only that, no address, no easy info on the internet) – Daniel Möller – 2018-05-09T14:48:52.2171I'm not much into
conda
, but AFAIRconda info
should at least print all the URLs of channels used, but no name mapping. – hoefling – 2018-05-09T14:59:12.667