我在我的应用中使用的是web3.py,直到收到此错误,一切都运行顺利。
Traceback (most recent call last):
File "run.py", line 1, in <module>
from api import app
File "C:\Users\Ty Cooper\Desktop\Coding\Projects\streamline\server\api\__init__.py", line 8, in <module>
from web3 import Web3
File "C:\Users\Ty Cooper\AppData\Local\Programs\Python\Python37\lib\site-packages\web3\__init__.py", line 7, in <module>
from eth_account import Account # noqa: E402
File "C:\Users\Ty Cooper\AppData\Local\Programs\Python\Python37\lib\site-packages\eth_account\__init__.py", line 1, in <module>
from eth_account.account import Account # noqa: F401
File "C:\Users\Ty Cooper\AppData\Local\Programs\Python\Python37\lib\site-packages\eth_account\account.py", line 10, in <module>
from eth_keyfile import (
File "C:\Users\Ty Cooper\AppData\Local\Programs\Python\Python37\lib\site-packages\eth_keyfile\__init__.py", line 7, in <module>
from eth_keyfile.keyfile import ( # noqa: F401
File "C:\Users\Ty Cooper\AppData\Local\Programs\Python\Python37\lib\site-packages\eth_keyfile\keyfile.py", line 5, in <module>
from Crypto import Random
ModuleNotFoundError: No module named 'Crypto'
我已经在网上寻找安装pycryptodome的机会,并且已经尝试安装了pycryptodome,但是由于某种原因,此错误仍然存在。
答案 0 :(得分:0)
我发现了问题。这是一个命名错误!我去了
File "C:\Users\Ty Cooper\AppData\Local\Programs\Python\Python37\lib\site-packages\eth_keyfile\keyfile.py", line 5, in <module>
from Crypto import Random
,我只是将所有文件夹名称大写。