Python3.7安装pycrypto失败,然后安装 pycryptodome成功

如果你是python3.7 建议安装

pip install -i https://pypi.douban.com/simple/ pycryptodome 

刚开始一直安装pycrypto 出现错误:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pycrypto/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pycrypto/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pycrypto/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pycrypto/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pycrypto/
ERROR: Could not find a version that satisfies the requirement pycrypto (from versions: none)
ERROR: No matching distribution found for pycrypto

发现是因为开了外网,把外网关了就可以

然后又出现了新的问题:

D:\Install\Anaconda\envs\pygra\Scripts>pip install pycrypto -i https://pypi.mirrors.ustc.edu.cn/simple/
Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple/
Collecting pycrypto
  Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446 kB)
     ---------------------------------------- 446.2/446.2 K最后B 91.8 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [149 lines of output]

然后果断选择安装pycryptodome:

pip install -i https://pypi.douban.com/simple/ pycryptodome 

成功

你可能感兴趣的:(python)