简体   繁体   English

pip ssl证书错误OSX安装scrapy

[英]pip ssl certificate error OSX installing scrapy

Getting an error from pip when installing scrapy on OS X El Capitan 在OS X El Capitan上安装scrapy时从pip获取错误

    ~ pip install scrapy
Requirement already satisfied (use --upgrade to upgrade): scrapy in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /usr/local/lib/python2.7/site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in /usr/local/lib/python2.7/site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): cssselect>=0.9 in /usr/local/lib/python2.7/site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): queuelib in /usr/local/lib/python2.7/site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): parsel>=0.9.3 in /usr/local/lib/python2.7/site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): PyDispatcher>=2.0.5 in /usr/local/lib/python2.7/site-packages (from scrapy)

Collecting cffi>=1.4.1 (from cryptography>=1.3->pyOpenSSL->scrapy)
  Could not fetch URL https://pypi.python.org/simple/cffi/: There was a problem confirming the ssl certificate: [Errno 2] No such file or directory - skipping
  Could not find a version that satisfies the requirement cffi>=1.4.1 (from cryptography>=1.3->pyOpenSSL->scrapy) (from versions: )
No matching distribution found for cffi>=1.4.1 (from cryptography>=1.3->pyOpenSSL->scrapy)

Have tried to reinstall pip, python & homebrew Scrubbed directories as well, but nothing working 尝试重新安装pip,python和homebrew清理目录,但无任何作用

Tried independently install cryptography, installing via brew — no dice 尝试独立安装密码,通过brew安装-无骰子

The entire environment was broken. 整个环境都坏了。

I deleted the following folders out of ~/usr/lib/ 我从〜/ usr / lib /中删除了以下文件夹

  • python2.7 python2.7
  • python3.4 python3.4
  • python3.5 python3.5

Then did the following 然后做了以下

brew uninstall python
brew update
brew upgrade
brew doctor
brew cleanup
brew install python
pip install scrapy

All works now! 现在一切正常!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM