pip 연결 실패 : 색인 기본 URL http://pypi.python.org/simple/을 가져올 수 없습니다.
을 실행 sudo pip install git-review
하면 다음 메시지가 나타납니다.
Downloading/unpacking git-review
Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement git-review
No distributions at all found for git-review
Storing complete log in /home/sai/.pip/pip.log
누구든지 이것에 대해 어떤 생각이 있습니까?
나는 이것이 오래된 스레드라는 것을 알고 있지만 오늘이 문제가 발생했으며 다른 곳 에서이 솔루션을 보지 못했기 때문에 문제에 대한 솔루션을 공유하고 싶었습니다.
내 환경 : virtualenv, pip 버전 1.1의 Ubuntu 12.04.5 LTS의 Python 2.7.12 / 2.7.14.
내 오류 :
pip install nose
콘솔에서 :
Cannot fetch index base URL http://pypi.python.org/simple/
~ / .pip / pip.log :
Could not fetch URL http://pypi.python.org/simple/: HTTP Error 403: SSL is required
약 1 년 동안 문제없이 스크립트에서 동일한 명령을 실행했기 때문에 궁금합니다.
이 문제가 해결되었습니다.
pip install --index-url=https://pypi.python.org/simple/
(https 참고)
이것이 누군가를 돕기를 바랍니다!
pip 설치 를 업그레이드해야합니다 .
--index-url
(짧은 버전 : -i
) 옵션을 사용하면 자신을 핍의 호출로 인덱스 - URL을 지정할 수 있습니다, 당신의 https-변형이 사용할 수 있습니다. 그런 다음 pip에 자체 업그레이드를 지시 할 수 있습니다.
sudo pip install --index-url https://pypi.python.org/simple/ --upgrade pip
이후에는 --index-url
옵션 없이 pip를 사용할 수 있어야합니다 .
릴리스 7.0.0 (2015-05-21) 이이 문제를 유발 했다고 생각합니다 . 해당 버전의 릴리스 노트에는 다음 내용이 나와 있습니다.
BACKWARD INCOMPATIBLE 더 이상 안전하지 않은 원본 원본을 암시 적으로 지원하지 않고 대신
--trusted-host
옵션을 사용하여 안전하지 않은 원본을 명시 적으로 신뢰해야합니다 .
.NET으로 pip 버전을 확인할 수 있습니다 pip --version
.
이것은 sudo pip install --trusted-host --upgrade pip
안전하지 않은 http를 통해 pip를 다운로드하더라도 한 번 발행 하면이 문제를 해결할 수도 있음을 의미합니다 . 안전하지 않은 엔드 포인트가 더 이상 서버에서 액세스 할 수 없기 때문에 전혀 작동하지 않을 수도 있습니다 (테스트하지 않았습니다).
편집하다:
의 현재 버전에는 PIP
더 이상이 문제가 없습니다. 현재 version : 7.1.2
은 현재 버전입니다. PIP
링크 는 다음과 같습니다 .
https://pypi.python.org/pypi/pip
원래 수정 :
사용하려고 할 때이 문제가 발생했습니다. pip==1.5.4
이것은 PIP 및 Python의 PYPI 신뢰 SSL 인증서와 관련된 문제입니다. Mac OS X의 /Users/username/.pip/pip.log 에서 PIP 로그를 보면 더 자세한 정보를 얻을 수 있습니다.
몇 시간 동안 다른 작업을 시도한 후 PIP를 백업하고 실행하는 내 해결 방법 은 virtualenv 에 있든 일반 사이트 패키지 에 있든 Python의 사이트 패키지 로 이동 하여 현재 PIP 버전을 제거하는 것입니다. 나를 위해pip==1.5.4
PIP 디렉토리와 PIP egg 파일을 삭제했습니다. 그리고 나는 달렸다
easy_install pip==1.2.1
이 버전의 PIP에는 SSL 문제가 없으며 pip install -r requirements.txt
내 requirements.txt
파일에 나열된 원하는 모든 패키지를 설정하기 위해 내 virtualenv 내에서 정상으로 이동하여 실행할 수있었습니다 .
이것은 또한 내가 찾은이 Google 그룹의 여러 사람이 문제를 통과시키기 위해 권장되는 해킹입니다.
https://groups.google.com/forum/#!topic/beagleboard/aSlPCNYcVjw
프록시를 가리 키도록 --proxy 명령 줄 옵션을 추가했으며 작동 중입니다 (pip 버전은 1.5.4 및 python 2.7 임). 어떤 이유로 셸 환경 변수 HTTPS_PROXY, HTTP_PROXY, https_proxy, http_proxy를 사용하지 않았습니다.
sudo pip --proxy [user:passwd@]proxy.server:port install git-review
프록시 연결을 확인하십시오. 비슷한 문제가 있었는데 프록시되지 않은 연결을 변경하여 라이브러리를 다운로드하고 설정하기 시작했습니다.
나는 pip==1.5.6
. 시스템 시간을 수정해야했습니다.
# date -s "2014-12-09 10:09:50"
pip 1.5.6에서 동일한 문제가 발생했습니다.
방금 ~ / .pip 폴더를 삭제했는데 매력처럼 작동했습니다.
rm -r ~/.pip/
이것은 Ubuntu 12.04에서 나를 위해 일했습니다.
pip install --index-url=https://pypi.python.org/simple/ -U scikit-learn
프록시 / 네트워크 문제가 아닌 경우 구성 파일을 생성 / 편집 .pip/pip.conf
하거나 루트로 pip를 실행중인 경우 시도해야 합니다 /root/.pip/pip.conf
. index-url을 http에서 https로 확인하고 변경 하십시오 .
다음과 같아야합니다.
[global]
index-url=https://pypi.python.org/simple/
Ubuntu 12 및 pip 9.0.1로 나를 위해 일했습니다.
효과가있다!
sudo pip --proxy = http://202.194.64.89:8000 install elasticsearch; 202.194.64.89:8000은 내 PROXY입니다.
이전에 OpenSSL의 오래된 버전에 연결된 Python을 업그레이드하여이 문제를 해결할 수있었습니다. 이제 1.0.1h-1을 사용하고 있으며 내 패키지는 pip 설치를 수행합니다.
참고로, 내 로그 및 명령, anaconda 사용 및 pytest-ipynb 패키지 설치 [1] :
$ conda update python
Fetching package metadata: ....
Solving package specifications: .
Package plan for installation in environment /Users/me/anaconda/envs/py27:
The following NEW packages will be INSTALLED:
openssl: 1.0.1h-1
The following packages will be UPDATED:
python: 2.7.5-3 --> 2.7.8-1
readline: 6.2-1 --> 6.2-2
sqlite: 3.7.13-1 --> 3.8.4.1-0
tk: 8.5.13-1 --> 8.5.15-0
Proceed ([y]/n)? y
Unlinking packages ...
[ COMPLETE ] |#############################################################| 100%
Linking packages ...
[ COMPLETE ] |#############################################################| 100%
$ pip install pytest-ipynb
Downloading/unpacking pytest-ipynb
Downloading pytest-ipynb-0.1.1.tar.gz
Running setup.py (path:/private/var/folders/4f/b8gwyhg905x94twqw2pbklyw0000gn/T/pip_build_me/pytest-ipynb/setup.py) egg_info for package pytest-ipynb
Requirement already satisfied (use --upgrade to upgrade): pytest in /Users/me/anaconda/envs/py27/lib/python2.7/site-packages (from pytest-ipynb)
Installing collected packages: pytest-ipynb
Running setup.py install for pytest-ipynb
Successfully installed pytest-ipynb
Cleaning up...
[1]이 문제에 대한 나의 티켓;
https://github.com/zonca/pytest-ipynb/issues/1
나는 같은 문제에 직면했지만 그것은 관련 프록시였습니다. 프록시를 설정하여 해결되었습니다.
Set http_proxy=http://myuserid:mypassword@myproxyname:myproxyport
Set https_proxy=http://myuserid:mypassword@myproxyname:myproxyport
이것은 누군가를 도울 수 있습니다.
프록시가 올바르게 구성된 경우 pip 버전 1.5.6이이를 올바르게 처리합니다. 버그가 해결되었습니다.
pip를 easy_install pip==1.5.6
추가 답변 : chroot 에서이 작업을 수행하는 경우 .
pypi에 대한 보안 연결을 설정하려면 난수의 소스가 필요합니다.
Linux에서는 호스트 dev를 chroot dev에 바인드 마운트 할 수 있습니다.
mount --bind /dev /path-to-chroot/dev
프록시 연결에서 pyinstaller를 설치하는 동안에도이 오류가 발생했습니다. 인터넷에 직접 연결 (동글 사용)하고 다시 연결했습니다.
sudo pip install pyinstaller
이것은 나를 위해 일했습니다.
/etc/resolv.conf에 DNS 서버 구성이 누락되었을 수 있습니다.
다음으로 핑할 수 있는지 확인하십시오 : ping pypi.python.org
핑이 발생하지 않으면 파일에 DNS 서버를 추가해보십시오.
네임 서버 xxx.xxx.xxx.xxx
내 설명 / 문의는 Windows 환경에 대한 것 입니다.
저는 파이썬을 처음 접했고 이것은 나보다 아직 초보자를위한 것입니다.
최신 pip (python 설치 패키지)를 설치하고 http://www.lfd.uci.edu/~gohlke/pythonlibs/ 에서 32 비트 / 64 비트 (오픈 소스) 호환 바이너리를 다운로드 했는데 제대로 작동했습니다.
일반적으로 핍에서 파이썬 설치시 기본적으로 설치되어 있지만 단계, 주사위를 설치하려면 다음 www.python.org/downloads/
다운로드 핍-7.1.0.tar.gz들 - https://pypi.python.org/pypi/pip .
-위 파일의 압축을 풀고 압축을 풉니 다.
-pip-7.1.0 폴더에서 python setup.py install을 실행합니다. 이 설치된 pip 최신 버전입니다.
pip를 사용하여 바이너리 패키지를 설치하십시오 (가능한 모든 작업). 다음과 같이 pip 앱을 실행하여 작업 (설치 파일)을 수행합니다.
\ python27 \ scripts \ pip2.7.exe install file_path \ file_name --proxy
만약, wheel (ie egg) 문제가 발생하면 호환되는 바이너리 패키지 파일을 사용하십시오. . 도움이 되었기를 바랍니다.
필자의 경우 (Python 3.4, macOS 10.10.6에서 실행되는 가상 환경) pip
자체 업그레이드조차 할 수 없었 습니다. 이 SO 답변 에서 다음과 같은 한 줄의 형태로 도움을 받았습니다 .
curl https://bootstrap.pypa.io/get-pip.py | python
(가상 환경을 사용하지 않는 경우 sudo python
.)
With this I managed to upgrade pip
from Version 1.5.6 to Version 10.0.0 (quite a jump!). This version does not use TLS 1.0 or 1.1 which are not supported any more by the Python.org site(s), and can install PyPI packages nicely. No need to specify --index-url=https://pypi.python.org/simple/
.
in my case I would install django (
pip install django
) and it has a same problem with ssl certificate (Cannot fetch index base URL http://pypi.python.org/simple/ )
it's from virtualenv so DO :
FIRST: delete your virtualenv
deactivate rm -rf env
SECOND: check have pip
pip3 -V
if you don't have
sudo apt-get install python3-pip
FINALLY:
install virtualenv with nosite-packages and make your virenviroment
sudo pip3 install virtualenv virtualenv --no-site-packages -p /usr/bin/python3.6
. env/bin/activate
I had a similar problem, but in my case I was getting the error:
Downloading/unpacking bencode
Cannot fetch index base URL http://c.pypi.python.org/simple/
Could not find any downloads that satisfy the requirement bencode
No distributions at all found for bencode
Storing complete log in /home/andrew/.pip/pip.log
In my case I was able to fix the error by editing ~/.pip/pip.conf and changing http://c.pypi.python.org/simple/
to http://pypi.python.org/simple
and then pip worked fine again.
I got this error message in ~/.pip/pip.log
Could not fetch URL https://pypi.python.org/simple/: connection error: [Errno 185090050] _ssl.c:344: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
Will skip URL https://pypi.python.org/simple/ when looking for download links for regulargrid
I fixed it by updating my ~/.pip/pip.conf
. It accidentally pointed to cacert.pem
file that did not exist and looked like this
[global]
cert = /some/path/.pip/cacert.pem
I used to use the easy_install pip==1.2.1
workaround but I randomly found that if you're having this bug, you probably installed a 32bit version of python.
If you install a 64bit version of it by installing it from the source and then build you virtualenv upon it, you wont have that pip bug anymore.
I too used the chosen solution (downgrading pip) to work around this issue until I ran into another seemingly unrelated issue caused by the same underlying problem. Python's version of OpenSSL was out of date. Check your OpenSSL version:
python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
If the version is 0.9.7
, that should verify that OpenSSL needs to be updated. If you know how to do that directly, great (but please let me know in a comment). If not, you can follow the advice in this answer, and reinstall python from the 64 bit/32 bit installer instead of the 32 bit only installer from python.org (I'm using python 3.4.2). I now have OpenSSL version 0.9.8
, and none of these issues.
Try doing reinstallation of pip :
curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
tar xvfz pip-1.2.1.tar.gz
cd pip-1.2.1
python setup.py install
If curl doesnot work , you will have proxy issues , Please fix that it should work fine. Check after opening google.com in your browser in linux.
The try installing
pip install virtualenv
In case you use a firewall, make sure outbound connections to port 443 are not blocked, e.g. run:
sudo iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
I have met the same questions with you. When I realize it may be caused by unmatched version of numpy or pip, I uninstalled numpy and pip, then continue as this 'https://radimrehurek.com/gensim/install.html', at last I succeed!
C:\Users\Asus>pip install matplotlib
Downloading/unpacking matplotlib
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement matplotlib
Cleaning up...
No distributions at all found for matplotlib
Storing debug log for failure in C:\Users\Asus\pip\pip.log
I used 'easy_install pip==1.2.1' and it worked fine.
C:\Users\Asus>easy_install pip==1.2.1
Searching for pip==1.2.1
Reading https://pypi.python.org/simple/pip/
Best match: pip 1.2.1
Downloading ...
Then on using this command 'pip install matplotlib'
C:\Users\Asus>pip install matplotlib
Downloading/unpacking matplotlib
Downloading matplotlib-2.0.0b4.tar.gz (unknown size):
If you're running these commands in a Docker container on Windows, it may mean that your docker machine's network connection is stale and needs to be rebuilt. To fix it, run these commands:
docker-machine stop
docker-machine start
@FOR /f "tokens=*" %i IN ('docker-machine env') DO @%i
I'm now getting this in $HOME/.pip/pip.log
:
Could not fetch URL https://pypi.python.org/simple/: HTTP Error 403: TLSv1.2+ is required
I don't have a straightforward solution for this, but I'm mentioning it as something to watch out for before you waste time on trying some of the other solutions here.
- I'm obviously already using a https URL
- There is no proxy or firewall issue
- Using
trusted-host
didn't change anything (dunno where I picked this up)
For what it's worth my openssl
is too old to even have ssl.OPENSSL_VERSION
so maybe that's really the explanation here.
In the end, wiping my virtual environment and recreating it with virtualenv --setuptools env
seems to have fixed at least the major blockers.
This is on a really old Debian box, Python 2.6.6.
My problem was the system virtualenv
version.
When I created an env with python3 venv everything worked. But when I used virtualenv (by default with python2.7) to create an env I receive those error messages.
In the virtualenv
created the pip version was 1.5.6
, but my system pip version was 10.0.1
Then I ran (outside any env):
pip install virtualenv --upgrade
It upgraded virtualenv
to version 16.0.0
and now my pip install
in the envs created with virtualenv
and python2.7
work flawlessly. Also, the pip
version inside the env is now 10.0.1
.
Before upgrade:
'program story' 카테고리의 다른 글
다른 호스트에서 Tomcat Manager 앱에 액세스 (0) | 2020.10.25 |
---|---|
ListView 마지막 요소에 아래쪽 여백 추가 (0) | 2020.10.25 |
평신도를위한 Java 8 공급자 및 소비자 설명 (0) | 2020.10.25 |
최대 절전 모드 대 iBATIS (0) | 2020.10.25 |
Notepad ++에서 JavaScript 코드를 들여 쓸 수 있습니까? (0) | 2020.10.25 |