CentOS默认python环境下pip install cryptography失败处理

CentOS Linux release 7.6.1810 (cat /etc/centos-release)

Python 2.7.5 (python -V)

pip 8.1.2 (pip --version)

# pip --no-cache-dir install -i https://pypi.douban.com/simple cryptography

Collecting cryptography
Downloading https://pypi.doubanio.com/packages/9b/77/461087a514d2e8ece1c975d8216bc03f7048e6090c5166bc34115afdaa53/cryptography-3.4.7.tar.gz (546kB)
100% |████████████████████████████████| 552kB 40.9MB/s 
Complete output from command python setup.py egg_info:

=============================DEBUG ASSISTANCE==========================
If you are seeing an error here please try the following to
successfully install cryptography:

Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
=============================DEBUG ASSISTANCE==========================

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-o2MAei/cryptography/setup.py", line 14, in <module>
from setuptools_rust import RustExtension
ImportError: No module named setuptools_rust

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-o2MAei/cryptography/
You are using pip version 8.1.2, however version 21.1.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

升级pip==10后重新安装

# pip --no-cache-dir install -i https://pypi.douban.com/simple pip==10

Collecting pip==10
  Downloading https://pypi.doubanio.com/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 68.9MB/s 
Installing collected packages: pip
  Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
      Successfully uninstalled pip-8.1.2
Successfully installed pip-10.0.0
You are using pip version 10.0.0, however version 21.1.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

# pip --no-cache-dir install -i https://pypi.douban.com/simple cryptography

Looking in indexes: https://pypi.douban.com/simple
Collecting cryptography
  Downloading https://pypi.doubanio.com/packages/86/41/44173175d378c9e3a73294bb33c73725f7726def5ce267af6bd11b72eb23/cryptography-3.3.2-cp27-cp27mu-manylinux1_x86_64.whl (2.7MB)
    100% |████████████████████████████████| 2.7MB 74.4MB/s 
Collecting enum34; python_version < "3" (from cryptography)
  Downloading https://pypi.doubanio.com/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl
Collecting cffi>=1.12 (from cryptography)
  Downloading https://pypi.doubanio.com/packages/ab/a7/1df1dcd222c9a35d2d0c4c123bd55a533ed2d07b09909ad085829deea4d6/cffi-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl (389kB)
    100% |████████████████████████████████| 399kB 83.3MB/s 
Collecting six>=1.4.1 (from cryptography)
  Downloading https://pypi.doubanio.com/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Requirement already satisfied: ipaddress; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography) (1.0.16)
Collecting pycparser (from cffi>=1.12->cryptography)
  Downloading https://pypi.doubanio.com/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
    100% |████████████████████████████████| 112kB 71.9MB/s 
Installing collected packages: enum34, pycparser, cffi, six, cryptography
Successfully installed cffi-1.14.5 cryptography-3.3.2 enum34-1.1.10 pycparser-2.20 six-1.16.0
You are using pip version 10.0.0, however version 21.1.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Done

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

Captcha Code

CAPTCHAis initialing...