DistUtilsError:找不到适用于Requirements.parse Cython的分发

时间:2019-06-03 09:57:15

标签: python ssl build pex pants

在使用“裤子”构建python源代码时,构建失败,并显示“ DistutilsError:找不到Requirement.parse('Cython!= 0.25,<0.30,> = 0.20')”的合适发行版

以下是错误的快照:

19:18:49 00:00 [main]
               (To run a reporting server: ./pants server)
19:18:49 00:00   [setup]
19:18:49 00:00     [parse]
               Executing tasks in goals: gen -> pyprep -> binary
19:18:49 00:00   [gen]
19:18:49 00:00     [thrift-py]
19:18:49 00:00   [pyprep]
19:18:49 00:00     [interpreter]
19:18:49 00:00     [build-local-dists]
19:18:49 00:00     [requirements]
19:18:50 00:01       [cache]   
                   No cached artifacts for 3 targets.
                   Invalidated 3 targets.**** Failed to install cassandra-driver-3.18.0 (caused by: NonZeroExit("received exit code 1 during execution of `[u'/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpZaWobT']` while trying to execute `[u'/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpZaWobT']`",)
):
stdout:

stderr:
Download error on https://pypi.org/simple/Cython/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'Cython' (maybe misspelt?)
Download error on https://pypi.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or working download links found for Cython!=0.25,<0.30,>=0.20
Traceback (most recent call last):
  File "<stdin>", line 9, in <module>
  File "setup.py", line 441, in <module>
    run_setup(None)
  File "setup.py", line 439, in run_setup
    **kw)
  File "build/bdist.macosx-10.12-intel/egg/setuptools/__init__.py", line 139, in setup
  File "build/bdist.macosx-10.12-intel/egg/setuptools/__init__.py", line 134, in _install_setup_requires
  File "build/bdist.macosx-10.12-intel/egg/setuptools/dist.py", line 514, in fetch_build_eggs
  File "build/bdist.macosx-10.12-intel/egg/pkg_resources/__init__.py", line 777, in resolve
  File "build/bdist.macosx-10.12-intel/egg/pkg_resources/__init__.py", line 1060, in best_match
  File "build/bdist.macosx-10.12-intel/egg/pkg_resources/__init__.py", line 1072, in obtain
  File "build/bdist.macosx-10.12-intel/egg/setuptools/dist.py", line 581, in fetch_build_egg
  File "build/bdist.macosx-10.12-intel/egg/setuptools/command/easy_install.py", line 670, in easy_install

distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('Cython!=0.25,<0.30,>=0.20')



               Waiting for background workers to finish.
19:18:51 00:02   [complete]
               FAILURE
timestamp: 2019-06-03T19:18:51.874305
Exception caught: (pex.resolver.Untranslateable) (backtrace omitted)
Exception message: Package SourcePackage(u'file:///Arun/Python/Heron/pmpex/.pants.d/python-setup/resolved_requirements/CPython-2.7.10/cassandra-driver-3.18.0.tar.gz') is not translateable by ChainedTranslator(WheelTranslator, EggTranslator, SourceTranslator)

我正在使用Mac OS X Sierra版本10.12.6。 Python,Pip和OpenSSL版本是最新的,如下所示:

$python --version
Python 2.7.16

$pip --version
pip 19.0.3 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)

$openssl version
OpenSSL 1.0.2r  26 Feb 2019

Mac中的Python也支持TLS 1.2,如下所示:

$python -c "import json, urllib2; print json.load(urllib2.urlopen('https://www.howsmyssl.com/a/check'))['tls_version']"
TLS 1.2

所有软件包也都是最新的,如下所示:

$pip list
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Package          Version
---------------- -------
cassandra-driver 3.18.0 
futures          3.2.0  
pip              19.1.1 
pyspark          2.3.1  
setuptools       41.0.1 
six              1.12.0 
wheel            0.33.4 

预期结果是,显然我的裤子成功了。甚至URL https://pypi.org/simple/Cython/也有效。我不确定这是什么根本原因。感谢任何帮助/指导以解决此错误。预先感谢。

0 个答案:

没有答案
相关问题