Som veľmi nový v Pythone a snažím sa > pip install linkchecker
na Windows 7. Niekoľko poznámok:
> pip install scrapy
tiež vedie k chybe SSL.python
a pip
neboli dostupné z príkazového riadku, kým som nenainštaloval verziu 3.4.1.> pip search linkchecker
funguje. Možno je to preto, že pip search neoveruje certifikát SSL stránky'.Tu je obsah môjho pip.log po spustení pip install linkchecker
:
Downloading/unpacking linkchecker
Getting page https://pypi.python.org/simple/linkchecker/
Could not fetch URL https://pypi.python.org/simple/linkchecker/: connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)
Will skip URL https://pypi.python.org/simple/linkchecker/ when looking for download links for linkchecker
Getting page https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'http.client.CannotSendRequest'>: Request-sent)
Will skip URL https://pypi.python.org/simple/ when looking for download links for linkchecker
Cannot fetch index base URL https://pypi.python.org/simple/
URLs to search for versions for linkchecker:
* https://pypi.python.org/simple/linkchecker/
Getting page https://pypi.python.org/simple/linkchecker/
Could not fetch URL https://pypi.python.org/simple/linkchecker/: connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)
Will skip URL https://pypi.python.org/simple/linkchecker/ when looking for download links for linkchecker
Could not find any downloads that satisfy the requirement linkchecker
Cleaning up...
Removing temporary dir C:\Users\jcook\AppData\Local\Temp\pip_build_jcook...
No distributions at all found for linkchecker
Exception information:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python34\lib\site-packages\pip\req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "C:\Python34\lib\site-packages\pip\index.py", line 277, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
pip.exceptions.DistributionNotFound: No distributions at all found for linkchecker
Pomocou tohto param môžete zadať certifikát:
pip --cert /etc/ssl/certs/FOO_Root_CA.pem install linkchecker
Pozri: Dokumenty » Referenčná príručka » pip
Ak uvedenie koreňového certifikátu vašej spoločnosti'nefunguje, možno bude fungovať cURL: http://curl.haxx.se/ca/cacert.pem
Musíte použiť súbor PEM a nie súbor CRT. Ak máte súbor CRT, budete musieť previesť súbor na PEM V komentároch sa objavujú správy, že to teraz funguje so súborom CRT, ale neoveril som to.
Skontrolujte tiež: Overenie SSL certifikátu.
Chybu SSL sa môžete pokúsiť obísť použitím protokolu http namiesto https. Samozrejme, že to nie je optimálne z hľadiska bezpečnosti, ale ak sa ponáhľate, malo by to stačiť:
pip install --index-url=http://pypi.python.org/simple/ linkchecker
Tento problém som vyriešil odstránením pipu a inštaláciou staršej verzie pipu: https://pypi.python.org/pypi/pip/1.2.1