如何卸载pycrypto?解决ModuleNotFoundError及依赖冲突问题
解决ModuleNotFoundError及卸载pycrypto的方法
卸载pycrypto的具体步骤
- 使用pip卸载:
在终端执行对应命令:- 通用环境:
pip uninstall pycrypto - Python 2环境:
pip2 uninstall pycrypto - Python 3环境:
pip3 uninstall pycrypto
- 通用环境:
- 若pip卸载失败,手动清理残留:
- 先通过命令找到Python的site-packages目录:
python -c "import site; print(site.getsitepackages())" - 进入该目录,删除
Crypto文件夹以及pycrypto-*.dist-info格式的文件夹
- 先通过命令找到Python的site-packages目录:
后续操作
卸载完成后,执行pip3 install pycryptodome安装替代库,即可正常导入Crypto模块使用。
内容的提问来源于stack exchange,提问作者Axel Smn
相关产品推荐
相关产品推荐

