Getting ImportError: No module named 'Crypto' after installation

Getting ImportError: No module named 'Crypto' after installation

我在尝试 运行 时收到 ImportError: No module named 'Crypto' 错误。我已经使用 pip install pycrypto 安装了 pycrypto 并对其进行了更新。我到目前为止所做的一切都没有成功。

尝试过:

有什么建议吗?

python 是否在您的机器上正确定义? 确保 PATH 环境变量中有 python 的安装文件夹

错误消息说,它找不到模块,所以请尝试 运行 下面的命令,

#pip list -- # what does it show to you, if it would have installed successfully it will show you up there.

如果 "pip install pycrypto" 不起作用,请尝试下载源 tar 球并尝试根据提示安装它。

pip download pycrypto

它将下载 tar.gz 文件..因此您可以使用 pip install --no-index --find-links /path/to/some/dir/ pycrypto

安装

对于 python3.5 版本

python3.5 -m pip install pycrypto

这将安装在 python3.5 环境中,之后您可以导入 pycrypto 模块