导入web3
python模块会导致以下assertion
错误。我正在使用python3
(也尝试了python2
)并安装了web3==4.0.0b6
,也尝试了3.16.4
。 eth_utils/crypto.py
不开心。也许我安装了错误的版本python-sha3
模块?
Traceback (most recent call last):
File "eth_send.py", line 1, in <module>
import web3
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/web3/__init__.py", line 7, in <module>
from web3.account import Account # noqa: E402
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/web3/account.py", line 11, in <module>
from eth_keyfile import (
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/eth_keyfile/__init__.py", line 7, in <module>
from eth_keyfile.keyfile import ( # noqa: F401
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/eth_keyfile/keyfile.py", line 11, in <module>
from eth_keys import keys
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/eth_keys/__init__.py", line 15, in <module>
from .main import ( # noqa: F401
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/eth_keys/main.py", line 3, in <module>
from eth_utils import (
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/eth_utils/__init__.py", line 5, in <module>
from .abi import ( # noqa: F401
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/eth_utils/abi.py", line 3, in <module>
from .crypto import keccak
File "/Users/mimerrit/ethereum/envname/lib/python3.5/site-packages/eth_utils/crypto.py", line 18, in <module>
assert keccak('') == b"\xc5\xd2F\x01\x86\xf7#<\x92~}\xb2\xdc\xc7\x03\xc0\xe5\x00\xb6S\xca\x82';{\xfa\xd8\x04]\x85\xa4p" # noqa: E501
AssertionError