Eth-Brownie Installation error: Tried all 3 methods [linux]
Eth-Brownie Installation error: Tried all 3 methods [linux]
我尝试通过 pipx、pip 和 github repo 安装布朗尼,但每次我在 运行 brownie
:
上收到此错误
Traceback (most recent call last):
File "/usr/bin/brownie", line 33, in <module>
sys.exit(load_entry_point('eth-brownie==1.17.2', 'console_scripts', 'brownie')())
File "/usr/bin/brownie", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/project/__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/project/main.py", line 45, in <module>
from brownie.network import web3
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/network/__init__.py", line 4, in <module>
from .account import Accounts
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/network/account.py", line 28, in <module>
from brownie.convert import EthAddress, Wei, to_address
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/convert/__init__.py", line 3, in <module>
from .datatypes import EthAddress, Fixed, Wei # NOQA: F401
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/convert/datatypes.py", line 8, in <module>
from vyper.exceptions import DecimalOverrideException
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/__init__.py", line 1, in <module>
from vyper.compiler import compile_code, compile_codes # noqa: F401
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/compiler/__init__.py", line 4, in <module>
from vyper.compiler import output
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/compiler/output.py", line 7, in <module>
from vyper.ast import ast_to_dict, parse_natspec
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/ast/__init__.py", line 19, in <module>
from . import expansion, folding # noqa: E402
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/ast/folding.py", line 5, in <module>
from vyper.builtin_functions import DISPATCH_TABLE
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/__init__.py", line 1, in <module>
from .functions import * # noqa: F403
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/functions.py", line 9, in <module>
from vyper.builtin_functions.convert import convert
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/convert.py", line 6, in <module>
from vyper.builtin_functions.signatures import signature
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/signatures.py", line 5, in <module>
from vyper.old_codegen.expr import Expr
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/expr.py", line 13, in <module>
from vyper.old_codegen import external_call, self_call
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/external_call.py", line 4, in <module>
from vyper.old_codegen.abi import abi_encode, abi_type_of
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/abi.py", line 4, in <module>
from vyper.old_codegen.parser_utils import (
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 42, in <module>
setcontext(DecimalContextOverride(prec=78))
File "/usr/lib/python3.9/_pydecimal.py", line 3898, in __init__
self.prec = prec if prec is not None else dc.prec
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 38, in __setattr__
raise DecimalOverrideException("Overriding decimal precision disabled")
vyper.exceptions.DecimalOverrideException: <exception str() failed>
如能帮助解决此问题,我们将不胜感激。
我终于设法解决了这个问题。我发现错误是由于 vyper,因为 vyper --version
也给出了类似的错误。
所以,我转到了最后提出的异常:
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 38, in __setattr__
raise DecimalOverrideException("Overriding decimal precision disabled")
并打开提到的文件..../vyper/old_codegen/parser_utils.py,并注释掉抛出异常的行。
Image of the commented code。
如此处所示,这完全消除了错误。我不知道这是否是最好的方法,但它似乎有效。
Success!
我尝试通过 pipx、pip 和 github repo 安装布朗尼,但每次我在 运行 brownie
:
Traceback (most recent call last):
File "/usr/bin/brownie", line 33, in <module>
sys.exit(load_entry_point('eth-brownie==1.17.2', 'console_scripts', 'brownie')())
File "/usr/bin/brownie", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/project/__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/project/main.py", line 45, in <module>
from brownie.network import web3
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/network/__init__.py", line 4, in <module>
from .account import Accounts
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/network/account.py", line 28, in <module>
from brownie.convert import EthAddress, Wei, to_address
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/convert/__init__.py", line 3, in <module>
from .datatypes import EthAddress, Fixed, Wei # NOQA: F401
File "/usr/lib/python3.9/site-packages/eth_brownie-1.17.2-py3.9.egg/brownie/convert/datatypes.py", line 8, in <module>
from vyper.exceptions import DecimalOverrideException
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/__init__.py", line 1, in <module>
from vyper.compiler import compile_code, compile_codes # noqa: F401
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/compiler/__init__.py", line 4, in <module>
from vyper.compiler import output
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/compiler/output.py", line 7, in <module>
from vyper.ast import ast_to_dict, parse_natspec
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/ast/__init__.py", line 19, in <module>
from . import expansion, folding # noqa: E402
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/ast/folding.py", line 5, in <module>
from vyper.builtin_functions import DISPATCH_TABLE
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/__init__.py", line 1, in <module>
from .functions import * # noqa: F403
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/functions.py", line 9, in <module>
from vyper.builtin_functions.convert import convert
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/convert.py", line 6, in <module>
from vyper.builtin_functions.signatures import signature
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/builtin_functions/signatures.py", line 5, in <module>
from vyper.old_codegen.expr import Expr
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/expr.py", line 13, in <module>
from vyper.old_codegen import external_call, self_call
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/external_call.py", line 4, in <module>
from vyper.old_codegen.abi import abi_encode, abi_type_of
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/abi.py", line 4, in <module>
from vyper.old_codegen.parser_utils import (
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 42, in <module>
setcontext(DecimalContextOverride(prec=78))
File "/usr/lib/python3.9/_pydecimal.py", line 3898, in __init__
self.prec = prec if prec is not None else dc.prec
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 38, in __setattr__
raise DecimalOverrideException("Overriding decimal precision disabled")
vyper.exceptions.DecimalOverrideException: <exception str() failed>
如能帮助解决此问题,我们将不胜感激。
我终于设法解决了这个问题。我发现错误是由于 vyper,因为 vyper --version
也给出了类似的错误。
所以,我转到了最后提出的异常:
File "/home/misterblack/.local/lib/python3.9/site-packages/vyper/old_codegen/parser_utils.py", line 38, in __setattr__
raise DecimalOverrideException("Overriding decimal precision disabled")
并打开提到的文件..../vyper/old_codegen/parser_utils.py,并注释掉抛出异常的行。 Image of the commented code。 如此处所示,这完全消除了错误。我不知道这是否是最好的方法,但它似乎有效。 Success!