I have an MacBook Air M2 with python version 3.11.2 I am getting this error message when I follow the pipx instructions to install brownie I tried using pip to install each of these packages individually and I still get the error

Fatal error from pip prevented installation. Full pip output in file:

pip failed to build packages:

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 Answer 1


Some packages might not yet have compatible pre-built binaries if you are using M1 Mac and Python 3.11.2.

Here what you can do, first if you havent install Xcode from the App store then go to a terminal and run xcode-select --install

then we install Homebrew and Python 3.9 ( some packages might not yet support Python 3.11.2 )

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install [email protected]

then we update our PATH accordingly export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"

then we restart our shell source ~/.zshrc or source ~/.bashrc then

python3.9 -m pip install --user pipx
python3.9 -m pipx ensurepath 

and finaly: pipx install eth-brownie

to do that in a virtual env and so keep your version of python do that:

install our env package python3 -m pip install --user virtualenv then we create our virtual env python3 -m virtualenv --python=/usr/local/bin/python3.9 myenv then we activate it ( you have to do it when you want to use eth-brownie, then we install it inside our virtualenv with source myenv/bin/activate then python -m pip install eth-brownie

  • Thank you so much for this help! Is it possible to do this without changing my default python version to 3.9? Like can I skip updating PATH? Unfortunately I tried this solution and got the same errors. Commented Apr 7, 2023 at 19:02
  • yes in a virtual env you could do that, I update my answer
    – Saxtheowl
    Commented Apr 7, 2023 at 20:51
  • I got it working now thank you!!! Commented Apr 7, 2023 at 23:12

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.