29 Comments
Dec 19, 2021·edited Dec 21, 2021Liked by BowTiedDevil

Thought I would add this solution to a bug I had while installing.

The bug was that the install for eth-brownie would fail using pip.

The eventual solution involved installing Cython, cytoolz, and then trying the eth-brownie install an nth time.

These pages were helpful: https://eth-brownie.readthedocs.io/en/stable/install.html

https://ethereum.stackexchange.com/questions/112042/link1120-error-when-attempting-to-install-brownie-with-pipx-install-eth-brownie

edit: still not getting the right brownie version. Am getting 1.16.4 from pip. will update progress when I figure it out.

2nd edit: Finally got brownie 1.17.2 by cloning its repo and using setup.py to install the 1.17.2. Victory!!

Expand full comment
author
Dec 19, 2021·edited Dec 19, 2021Author

Thanks for sharing! If you're trying to install a particular version of a package, you can include it after the package name like this "pip3 install eth-brownie==1.17.2"

On a Debian-based Linux, those dependencies are installed by the python3-dev package.

Expand full comment
Dec 26, 2021Liked by BowTiedDevil

this worked for me thnx

Expand full comment

Thanks for that. It seemed to work for me.

Expand full comment
Jan 4, 2022·edited Jan 15, 2022Liked by BowTiedDevil

also had issues installing eth-brownie.

Had to install Microsoft Visual C++ 14.0+ with 'C++ build tools' and 'Universal Windows Platform build tools' (for the Windows 10 SDK)

don't know whether I need all of what's in those packs but fck it, it works

Expand full comment
author

Thanks for posting the Windows solution, way too many combinations to guarantee a smooth install. It should go better for you now that you're running 🤞

Expand full comment
May 15, 2022·edited May 16, 2022

on a different machine: 'pip failed to build package: cytoolz',

Had to run "pip install cython"

Then uninstall Python 3.10, install 3.9, run "pip install eth-brownie" for the latest version, as mentioned by @Summoneering

Expand full comment
author

Python 3.10 plays poorly with the latest eth-brownie from pip. I posted a one-liner fix on Twitter, check it out:

https://twitter.com/BowTiedDevil/status/1521603234342727680?s=20&t=zeZvlEvvuHQd2vTWjkh2aw

Expand full comment
Jun 12, 2022·edited Jun 12, 2022Liked by BowTiedDevil

https://github.com/eth-brownie/brownie

hey there. thanks for the blog/substack. just starting up and going to see where I can contribute.

I noticed that brownie needs python3 and ganache (dependencies). Is it recommended to have both? Or is python3 enough.

Then if ganache is needed, it also requires node.js, npm, and I'm kinda going into jungleville here. ie unsure if this is the right path.

Expand full comment
author

Ganache is useful if you're going to be deploying and testing smart contracts (we do this later in the smart contract arbitrage series). For now, Python 3 is all you need and I mainly use Brownie as a simple wrapper for the web3py library.

Expand full comment
Jun 12, 2022Liked by BowTiedDevil

thanks for the fast response. so if I understand correctly the dependencies stated are not requirements or something. they are semi-dependencies for full application / use of eth-brownie.

just installed eth-brownie... version 1.19.0, on we go.

Expand full comment
author

Yes sir you've got it, everything that you need to run Brownie standalone is pulled in via 'pip install' or the pipx equivalent

Expand full comment
Feb 23, 2022Liked by BowTiedDevil

I am very new but I really I am trying. I downloaded Pop! OS. I tried running the apt command in the terminal tab to try to get python3-venv version 3.9.2and python3-pip version 20.3.4...it does not work that way. "It says it is not available but it is refereed to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source." What am I missing?

Expand full comment
author

Please post the exact command that is giving you that error and I'll help sort this out.

Expand full comment
Feb 23, 2022Liked by BowTiedDevil

nvm I figured it out

Expand full comment
Feb 10, 2022Liked by BowTiedDevil

With what we are building could I use a raspberry pi?

Expand full comment
author

Assuming that our toolkit is available on the ARM architecture, everything will work as expected.

The bot itself needs very few resources, all of the blockchain work is being done through a remote node.

Expand full comment

Really green here. Does anyone have a setup tutorial for an M1 Mac?

Expand full comment
author

I don't have an M1, but this recent stackexchange discussion suggests that a native method is possible — https://ethereum.stackexchange.com/questions/128654/brownie-unable-to-compile-contracts-on-apple-m1-mac

Expand full comment

On a Mac, installed python 3.9.7.

Checked that pip is installed and it is version 22.0.4.

Then installed both cython and cytoolz without issue.

Setuptools and wheel I made sure are also installed and up to date.

Not sure if I'm doing this right installing eth-brownie giving me issues.

Tried:

"pip install eth-brownie"

"pip3 install eth-brownie==1.17.2"

"pip install eth-brownie==1.17.2"

All gave me a bunch of errors:

"Building wheels for collected packages: bitarray, cytoolz, lru-dict

Building wheel for bitarray (setup.py) ... error

error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.

│ exit code: 1

╰─> [17 lines of output]"

"error: command '/usr/bin/gcc' failed with exit code 1

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for bitarray

Running setup.py clean for bitarray

Building wheel for cytoolz (setup.py) ... error

error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.

│ exit code: 1"

"xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

error: command '/usr/bin/gcc' failed with exit code 1

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for cytoolz

Running setup.py clean for cytoolz

Building wheel for lru-dict (setup.py) ... error

error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.

│ exit code: 1"

"xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

error: command '/usr/bin/gcc' 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.

╰─> lru-dict"

then tried to clone repo and install via setuptools via:

git clone https://github.com/eth-brownie/brownie.git

cd brownie

python3 setup.py install

but getting error: "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun"

also

"-bash: cd: brownie: No such file or directory"

I'm doing this all from command line. Really appreciate any help you can point me towards!

Thank you

Expand full comment
author

I'm flying a bit blind here since I don't have a Mac, but some quick googling tells me that xcrun is missing, which is part of the xcode package.

https://www.bpetersen.dk/post/how-to-fix-mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun

Expand full comment
Mar 8, 2022·edited Mar 8, 2022Liked by BowTiedDevil

Got it thanks for fast response!

For anyone newer using Mac that doesn't have Xcode installed and also doesnt have enough disk space to download the whole thing all you need is the xcode command line tools. Download directed from terminal using:

"xcode-select --install"

Expand full comment

On windows, pip installed eth-brownie 1.16.4, input "pip install eth-brownie==1.17.2" and get "ERROR: Could not find a version that satisfies the requirement vyper==0.3.1 (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.1"

Expand full comment
author

I've seen reports that Python v 3.10 creates weird package incompatibility issues. Are you using that?

Here's a relevant thread with that same error — https://ethereum.stackexchange.com/questions/115371/brownie-deployment-keyerror-openzeppelin-openzeppelin-contracts4-4-0-addres

Expand full comment
Feb 17, 2022Liked by BowTiedDevil

installed python 3.9, uninstalled 3.10, and ran "python -m pip install eth-brownie" and now i have brownie v1.18.1

Expand full comment
author

Excellent! Brownie just released v 1.18, and I've tested it against my bot code and it works with no problem. Good to go 👍

Expand full comment

i am having a problem running brownie on arch.... any help ImportError: /home/unchained/.local/lib/python3.10/site-packages/cytoolz/functoolz.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send

Expand full comment

it seems brownie doesnt work with python 3.10, changing python versions will probably break alot of things on my system

Expand full comment
author

I'm using 3.9 so my experience is limited, but I found an encouraging bug report at https://github.com/pytoolz/cytoolz/issues/151 where the fix is to `pip install cython` followed by `pip install cytoolz`

There's also an Arch forum post about using PyEnv or the AUR python39 package - https://bbs.archlinux.org/viewtopic.php?id=272108

Expand full comment