一、问题描述
今天运行Python程序(Python版本:Python310)时遇到这样的问题:
ModuleNotFoundError: No module named 'Crypto'
二、解决方案
执行以下命令:
pip install pycryptodome
依然报错:
... ...
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
WARNING: You are using pip version 21.2.3; however, version 23.3.2 is available.
You should consider upgrading via the 'xxx\Python310\python.exe -m pip install --upgrade pip' command.
按照警告提示,升级pip:
xxx\Python310\python.exe -m pip install --upgrade pip
然后再次执行:
pip install pycryptodome
成功安装pycryptodome: