python导入crypto模块失败提示ImportError:DLL找不到指定的模块是怎么回事?

如题所述

python导入crypto模块失败提示ImportError:DLL找不到指定的模块的原因:缺少crypto 库。

解决办法是:

第一步:上网查资料,需要安装python 的这个pycrypto库

(1)查询安装库,需要先安装pip 

(2)安装pip的语句:

    安装pip :建议安装Homebrew,然后brew install python

    获取home-brew:命令行执行:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

    命令行继续执行:brew install wget

    这时候再去检查pip ,已经安装成功了

第二步:用pip安装库

(1)使用语句:pip3 install git+https://github.com/RNCryptor/RNCryptor-python.git#egg=rncryptor

(2)开始升级pip版本,执行pip3 install pymysql.还是报错,需要执行:pip3 install --upgrade pip.

第三步:用pip安装pycrypto库了

(1)执行安装语句:pip3 install git+https://github.com/RNCryptor/RNCryptor-python.git#egg=rncryptor.

(2)直接根据提示的日志,已经安装了这个库,用命令行执行:pip3 install Crypto,还是提示以上错误,继续执行:pip3 install pycrypto 还是提示以上错误。直接执行卸载语句:pip3 uninstall pycrypto,提示卸载成功,再次执行:pip3 install pycrypto提示安装成功,重启pycharm 后运行项目。

温馨提示:答案为网友推荐,仅供参考