首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装ETH Brownie时出错

安装ETH Brownie时出错
EN

Ethereum用户
提问于 2022-12-05 16:00:12
回答 1查看 455关注 0票数 1

因此,当我试图在我的Mac上安装eth时,三个不同进程中的每个进程都有一个错误.

  1. 使用"pip install eth-brownie",我得到了错误。
代码语言:javascript
复制
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
      20 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> typed-ast

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
  1. 当我输入"pipx install eth-brownie“时,我得到
代码语言:javascript
复制
Fatal error from pip prevented installation.

pip failed to build packages:
    bitarray
    cytoolz
    yarl

Some possibly relevant errors from pip install:
    cytoolz/dicttoolz.c:209:12: fatal error: 'longintrepr.h' file not found
    yarl/_quoting_c.c:196:12: fatal error: 'longintrepr.h' file not found

Error installing eth-brownie.
  1. 当我尝试"pipx git+https://github.com/eth-brownie/brownie.git@master““时,我遇到了:
代码语言:javascript
复制
Fatal error from pip prevented installation.

pip seemed to fail to build package:
    vvm==0.1.0

Some possibly relevant errors from pip install:
    ERROR: Ignored the following versions that require a different python version: 0.3.0 Requires-Python >=3.7,<3.10; 0.3.1 Requires-Python >=3.7,<3.10; 0.3.2 Requires-Python >=3.7,<3.11; 0.3.3 Requires-Python >=3.7,<3.11; 0.3.4 Requires-Python >=3.7,<3.11; 0.3.5 Requires-Python >=3.7,<3.11; 0.3.6 Requires-Python >=3.7,<3.11; 0.3.7 Requires-Python >=3.7,<3.11; 3.0.0 Requires-Python >=3.6, <3.11; 3.1.0 Requires-Python >=3.6, <3.11
    ERROR: Could not find a version that satisfies the requirement vyper==0.3.7 (from eth-brownie) (from versions: 0.1.0b1, 0.1.0b2, 0.1.0b3, 0.1.0b4, 0.1.0b5, 0.1.0b6, 0.1.0b7, 0.1.0b8, 0.1.0b9, 0.1.0b10, 0.1.0b11, 0.1.0b12, 0.1.0b13, 0.1.0b14, 0.1.0b15, 0.1.0b16, 0.1.0b17, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16)
    ERROR: No matching distribution found for vyper==0.3.7

Error installing eth-brownie from spec 'git+https://github.com/eth-brownie/brownie.git@master'.

作为一个奖励,我运行“布朗尼”并得到了这个

代码语言:javascript
复制
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/brownie", line 33, in <module>
    sys.exit(load_entry_point('eth-brownie==1.19.2', 'console_scripts', 'brownie')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/brownie", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/metadata/__init__.py", line 198, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1128, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1128, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/eth_brownie-1.19.2-py3.11.egg/brownie/__init__.py", line 6, in <module>
    from brownie.project import compile_source, run
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/eth_brownie-1.19.2-py3.11.egg/brownie/project/__init__.py", line 3, in <module>
    from .main import (  # NOQA 401
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/eth_brownie-1.19.2-py3.11.egg/brownie/project/main.py", line 19, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

我不知道该做什么,并将感谢帮助,因为我希望开发使用vyper和据我所知,brownie是唯一的应用程序rn,真正支持python。

我愿意接受建议、建议和建设性的批评。

EN

回答 1

Ethereum用户

发布于 2022-12-05 19:59:23

根据经验,在Python的虚拟env (Venv)中使用brownie要容易得多:

代码语言:javascript
复制
pip install virtualenv    
python3 -m venv /path/to/new/virtual/environment

然后您可以登录到它:

代码语言:javascript
复制
source /path/to/new/virtual/environment/bin/activate

并安装eth-brownie

代码语言:javascript
复制
pip install eth-brownie
票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/140635

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档