Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

出错了 #10

Open
disburden opened this issue Jun 30, 2021 · 4 comments
Open

出错了 #10

disburden opened this issue Jun 30, 2021 · 4 comments

Comments

@disburden
Copy link

ModuleNotFoundError: No module named 'Crypto'

@snackchan
Copy link

同样,报错如下:
Traceback (most recent call last):
File "./ssfconv", line 4, in
from Crypto.Cipher import AES
ImportError: No module named Crypto.Cipher

@fkxxyz
Copy link
Owner

fkxxyz commented Jul 15, 2021

需要 python3 环境和 Crypto 库

@hotarugali
Copy link

Crypto 库要安装 pycrypto

pip install pycrypto

python 还有个 crypto 包,但并不对应 Crypto 库,需要注意一下。

@SimingLiu
Copy link

SimingLiu commented Mar 19, 2024

Crypto 包已经改名 叫 pycryptodome 了 可以使用 pip install pycryptodome安装,如果安装后还是显示 No module named Crypto.Cipher 说明 pip的运行环境和脚本python3的环境是两个独立的环境。
分别进入两个环境下面执行python3, 用print(sys.path)打印环境信息。如下:

python3                                                       
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
['', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/home/yourhome/.local/lib/python3.11/site-packages', '/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.11/dist-packages']
>>> 

如上说明,第三方库目录是 /home/yourhome/.local/lib/python3.11/site-packages,进入这里看看。有没有Crypto文件夹。如果没有,就去另外一个python环境下的第三方库目录中的Crypto文件夹,复制到此。反之亦然。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants