pip ssl证书错误OSX安装scrapy

时间:2016-09-12 04:08:53

标签: python macos ssl https pip

在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)

试图重新安装pip,python&自制 擦洗目录,但没有任何工作

尝试独立安装加密技术,通过brew安装 - 没有骰子

1 个答案:

答案 0 :(得分:0)

整个环境都破了。

我从〜/ usr / lib /

中删除了以下文件夹
  • python2.7
  • python3.4
  • python3.5

然后做了以下

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

现在一切正常!