I have tried using pip with index-url in pip.conf
. However, i can not make sure that we can get all the necessary python library. So, i want to know if pip support specify more than one index-url
in [global]
section in pip.conf
.
相关问题
- How to install local library with pip to a conda e
- Cant Install Tensorflow 2.2.0rc0 in Ubuntu with Gi
- ssl not available
- installing packages for python 3
- Why my pip installations requires python -m instal
相关文章
- 在liunx 安装Levenshtein错误
- Raspberry Pi-Python: Install Pandas on Python 3.5.
- Should I use pip.main() or subprocess.call() to in
- How can I add dependency link to repo subdirectory
- Is there a way for pip to install only new depende
- why do I keep getting this message when installing
- Find default pip index-url
- Pip error -> ImportError: No module named helpers
If you want more than one package index you have to use the
--extra-index-url
From the pip man page:
In
pip.conf
the name of settings must be put without--
. From the documentation:So you can add in your
pip.conf
In your
pip.conf
, you will also have to add both of the index hosts as trusted, so would look something like this:In this example, you have a primary index and two extra index urls and all hosts are trusted.
If you don't specify the host as trusted, you will get the following error:
Cheers!
updating radtek 's answer with the new URL to pypi.
It changed to https://pypi.org
So for your pip to be able to fall back to the original pypi server you'll need to add "https://pypi.org/simple" as an extra-index-url while keeping your local server as index-url. Don't forget to add both to your "trusted-host" list
This update is based on the comment of onelaview: "Official PyPI now supports HTTPS so you can specify https://pypi.org/simple/ for extra-index-URL and avoid specifying pypi.org in trusted-host."
So your pip.conf needs to be containing the following: