本文介绍了点安装扭曲错误1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac osx 10.9.4上的virtualenv中使用pip install Twisted时,得到以下结果:

When using pip install Twisted in virtualenv on Mac osx 10.9.4, I get this result:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/9r/3b500gbs3093ms87mqqbckr80000gn/T/pip-build-doynftp7/twisted/

我不确定该如何解决.我使用了easy_install,但是遇到了SSL验证问题.有人有类似的问题吗?其余错误消息如下.

I am not sure how to resolve. I used easy_install, but I get a SSL verification issue. Anyone have similar issue? The rest of error message is below.

 Collecting twisted
 Using cached Twisted-16.6.0.tar.bz2
 Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/incremental/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
Couldn't find index page for 'incremental' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
No local packages or working download links found for incremental>=16.10.1
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/9r/3b500gbs3093ms87mqqbckr80000gn/T/pip-build-lqvxc68n/twisted/setup.py", line 21, in <module>
    setuptools.setup(**_setup["getSetupArgs"]())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Users/Complex-Cauchy/1/lib/python3.6/site-packages/setuptools/dist.py", line 317, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "/Users/Complex-Cauchy/1/lib/python3.6/site-packages/setuptools/dist.py", line 372, in fetch_build_eggs
    replace_conflicting=True,
  File "/Users/Complex-Cauchy/1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 851, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/Users/Complex-Cauchy/1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1123, in best_match
    return self.obtain(req, installer)
  File "/Users/Complex-Cauchy/1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1135, in obtain
    return installer(requirement)
  File "/Users/Complex-Cauchy/1/lib/python3.6/site-packages/setuptools/dist.py", line 440, in fetch_build_egg
    return cmd.easy_install(req)
  File "/Users/Complex-Cauchy/1/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 668, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')
 ----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/9r/3b500gbs3093ms87mqqbckr80000gn/T/pip-build-lqvxc68n/twisted/

运行openssl s_client -showcerts -connect pypi.python.org:443返回以下内容:

Running openssl s_client -showcerts -connect pypi.python.org:443 returns the following:

 CONNECTED(00000003)
 depth=1 /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended     Validation Server CA
 verify error:num=20:unable to get local issuer certificate
 verify return:0
 ---
 Certificate chain
  0 s:/businessCategory=Private Organization/1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/serialNumber=3359300/street=16 Allen    Rd/postalCode=03894-4801/C=US/ST=NH/L=Wolfeboro/O=Python Software Foundation/CN=www.python.org
  i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
  -----BEGIN CERTIFICATE-----
  MIIIWjCCB0KgAwIBAgIQCXCW7BLw16II/CMOsOFe/jANBgkqhkiG9w0BAQsFADB1
  ..
 -----END CERTIFICATE-----
 1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
 i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
 -----BEGIN CERTIFICATE-----
MIIEtjCCA56gAwIBAgIQDHmpRLCMEZUgkmFf4msdgzANBgkqhkiG9w0BAQsFADBs
....
-----END CERTIFICATE-----
 Server certificate
 subject=/businessCategory=Private Organization/1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/serialNumber=3359300/street=16 Allen Rd/postalCode=03894-4801/C=US/ST=NH/L=Wolfeboro/O=Python Software Foundation/CN=www.python.org
issuer=/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended  Validation Server CA
---
No client certificate CA names sent
---
SSL handshake has read 3524 bytes and written 456 bytes
---
New, TLSv1/SSLv3, Cipher is AES128-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol  : TLSv1
Cipher    : AES128-SHA
Session-ID: BC7695FF86D2B82B20468A13E3F3E13AE23776B500E64665305EEBAF49BB54D1
Session-ID-ctx:
Master-Key:8D25B34237A3C74E90317D87BA74A2AAF0E8C424FB2ADE3D72E5F234D5E043C4527641290B928B3A22 1BE7D44116CFB1
Key-Arg   : None
Start Time: 1487035770
Timeout   : 300 (sec)
Verify return code: 0 (ok)

推荐答案

在Mac OSX 10.11.6上,在带有全新安装的Python3.6.1的新virtualenv中,我遇到了相同的问题.就我而言,我安装了Twisted依赖项 incremental 的旧版本,这阻止了安装.

I had the same issue on a Mac OSX 10.11.6 in a new virtualenv with a fresh install of Python3.6.1. In my case, I had old versions of the Twisted dependency incremental installed, which prevented the installation.

pip install --upgrade incremental
pip install Twisted

注意I::我从要求文件中安装了一组完整的软件包,其中指定了相同的 incremental 版本.我真的很好奇为什么增量式升级会有所帮助,却不知道实际出了什么问题.如果有人可以澄清,那就太好了.

Note I: I was installing a whole array of packages from a requirements file where the same incremental version was specified. I really wonder why the upgrade of incremental helped and have no clue what actually went wrong. If someone can clarify, that would be great.

注意II: [对于CentOS7的使用经验]也似乎在全新安装之前也必须在Twisted之前安装增量软件.

Note II: Installing incremental ahead of of Twisted seems to be necessary on fresh installs, too [Experienced when working with CentOS7].

注释III:该问题已传达给了令人惊叹的Twisted社区,并且曾经已实施#9457扭曲票证,并且在发行版中,此问题和我的回答都将过时.

Note III: The issue was communicated to the amazing Twisted community and once Twisted ticket #9457 is implemented and in the release this question and my answer should become obsolete.

这篇关于点安装扭曲错误1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!