1

So I get a error for each of the 3 different processes when I attempt to install eth-brownie on my Mac OS...

  1. With "pip install eth-brownie", I get the error
    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. When I put "pipx install eth-brownie", I get
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. Why I attempt "pipx install git+https://github.com/eth-brownie/brownie.git@master", I run into:
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'.

and as a bonus just to check I run "brownie" and get this

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'

I am not sure what to do and would appreciate the help because I am looking to develop using vyper and from my knowledge brownie is the only application rn thats supportive of python really.

I am open to tips, suggestions, and constructive criticism

3
  • Looks like pipx is the preferred install method. Did you do all the pipx install steps exactly? 1) python3 -m pip install --user pipx 2) python3 -m pipx ensurepath, and 3) Restart your terminal after installing pipx. Based on your brownie error message, it looks like some part of your installed tools/packages is out-of-date and causing an old version of brownie to install. By the way, are you using homebrew for any of these tools? I installed brownie a few months ago on mac. I use brew. If I run into trouble, I sometimes uninstall and reinstall prerequisites
    – devdanke
    Commented Dec 5, 2022 at 19:54
  • Other things to try: I see you're using Python 3.11. Maybe Brownie isn't ready for 3.11? Consider reverting to a Python 3.10 (that's what I use). Are you using a virtual environment? If not, consider using venv to isolate your Brownie install from other Python stuff you've got. I'm no Python expert. Maybe a more knowledgable Python person will add some diagnostic advice. If all else fails you could install Brownie on a Docker image. That would let you move ahead with Brownie while you investigate why the install doesn't work on your macos.
    – devdanke
    Commented Dec 5, 2022 at 20:08
  • Also (just remembered), I followed the Curve tutorial on installing Brownie too. It's a Youtube video: youtube.com/watch?v=oo6YRNf3eZM .
    – devdanke
    Commented Dec 5, 2022 at 20:09

1 Answer 1

1

From experience, it's much easier to use brownie with Python's virtual env (venv):

pip install virtualenv    
python3 -m venv /path/to/new/virtual/environment

You can then log into it :

source /path/to/new/virtual/environment/bin/activate

And install eth-brownie:

pip install eth-brownie
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.