brownie: Unable to install eth-brownie on Python 3.10.6

Environment information

We are not able to install eth-brownie on any Python 3.10 version because of PyYaml dependencies. Our pipelines keep on failing because of this :

  • brownie Version: >=1.19.0
  • Python Version: 3.10.x
  • OS: linux

What was wrong?

It seems PyYaml installation fails with versions up until 6.0.0 because of Cython 3 More additional links and info:

  • Command to replicate => The fastest way to test this could be : docker run python:3.10.6 pip install eth-brownie
  • Full Error Output:
Collecting eth-brownie
  Downloading eth_brownie-1.19.3-py3-none-any.whl (232 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.6/232.6 KB 2.5 MB/s eta 0:00:00
Collecting dataclassy==0.11.1
  Downloading dataclassy-0.11.1-py3-none-any.whl (23 kB)
Collecting eth-utils==1.10.0
  Downloading eth_utils-1.10.0-py3-none-any.whl (24 kB)
Collecting pytest-xdist==1.34.0
  Downloading pytest_xdist-1.34.0-py2.py3-none-any.whl (36 kB)
Collecting protobuf==3.19.5
  Downloading protobuf-3.19.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 9.7 MB/s eta 0:00:00
Collecting execnet==1.9.0
  Downloading execnet-1.9.0-py2.py3-none-any.whl (39 kB)
Collecting pytest==6.2.5
  Downloading pytest-6.2.5-py3-none-any.whl (280 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 280.7/280.7 KB 7.9 MB/s eta 0:00:00
Collecting toolz==0.12.0
  Downloading toolz-0.12.0-py3-none-any.whl (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.8/55.8 KB 5.9 MB/s eta 0:00:00
Collecting toml==0.10.2
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting eth-keyfile==0.5.1
  Downloading eth_keyfile-0.5.1-py3-none-any.whl (8.3 kB)
Collecting py==1.11.0
  Downloading py-1.11.0-py2.py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.7/98.7 KB 6.5 MB/s eta 0:00:00
Collecting eth-abi==2.2.0
  Downloading eth_abi-2.2.0-py3-none-any.whl (28 kB)
Collecting vyper==0.3.7
  Downloading vyper-0.3.7-py3-none-any.whl (288 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 288.4/288.4 KB 12.4 MB/s eta 0:00:00
Collecting py-solc-ast==1.2.9
  Downloading py_solc_ast-1.2.9-py3-none-any.whl (10 kB)
Collecting multiaddr==0.0.9
  Downloading multiaddr-0.0.9-py2.py3-none-any.whl (16 kB)
Collecting websockets==9.1
  Downloading websockets-9.1.tar.gz (76 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.7/76.7 KB 7.6 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting wcwidth==0.2.5
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Requirement already satisfied: wheel==0.37.1 in /usr/local/lib/python3.10/site-packages (from eth-brownie) (0.37.1)
Collecting hexbytes==0.2.3
  Downloading hexbytes-0.2.3-py3-none-any.whl (6.4 kB)
Collecting asttokens==2.0.5
  Downloading asttokens-2.0.5-py2.py3-none-any.whl (20 kB)
Collecting python-dateutil==2.8.1
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 227.2/227.2 KB 6.0 MB/s eta 0:00:00
Collecting pathspec==0.10.1
  Downloading pathspec-0.10.1-py3-none-any.whl (27 kB)
Collecting yarl==1.8.1
  Downloading yarl-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (263 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 264.0/264.0 KB 7.0 MB/s eta 0:00:00
Collecting pycryptodome==3.15.0
  Downloading pycryptodome-3.15.0-cp35-abi3-manylinux2010_x86_64.whl (2.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 8.8 MB/s eta 0:00:00
Collecting prompt-toolkit==3.0.31
  Downloading prompt_toolkit-3.0.31-py3-none-any.whl (382 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 382.3/382.3 KB 8.4 MB/s eta 0:00:00
Collecting requests==2.28.1
  Downloading requests-2.28.1-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 KB 5.8 MB/s eta 0:00:00
Collecting bitarray==2.6.0
  Downloading bitarray-2.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (242 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 242.4/242.4 KB 7.4 MB/s eta 0:00:00
Collecting eth-typing==2.3.0
  Downloading eth_typing-2.3.0-py3-none-any.whl (6.2 kB)
Collecting iniconfig==1.1.1
  Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting attrs==22.1.0
  Downloading attrs-22.1.0-py2.py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.8/58.8 KB 5.9 MB/s eta 0:00:00
Collecting lazy-object-proxy==1.7.1
  Downloading lazy_object_proxy-1.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.3/62.3 KB 2.9 MB/s eta 0:00:00
Collecting aiohttp==3.8.3
  Downloading aiohttp-3.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 12.9 MB/s eta 0:00:00
Collecting lru-dict==1.1.8
  Downloading lru_dict-1.1.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB)
Collecting six==1.16.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting tqdm==4.64.1
  Downloading tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 KB 5.2 MB/s eta 0:00:00
Collecting eth-keys==0.3.4
  Downloading eth_keys-0.3.4-py3-none-any.whl (21 kB)
Collecting platformdirs==2.5.2
  Downloading platformdirs-2.5.2-py3-none-any.whl (14 kB)
Collecting pyjwt==1.7.1
  Downloading PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Collecting eth-event==1.2.3
  Downloading eth_event-1.2.3-py3-none-any.whl (7.3 kB)
Collecting web3==5.31.3
  Downloading web3-5.31.3-py3-none-any.whl (501 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 501.8/501.8 KB 8.8 MB/s eta 0:00:00
Collecting eth-hash[pycryptodome]==0.3.3
  Downloading eth_hash-0.3.3-py3-none-any.whl (8.9 kB)
Collecting varint==1.0.2
  Downloading varint-1.0.2.tar.gz (1.9 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting parsimonious==0.8.1
  Downloading parsimonious-0.8.1.tar.gz (45 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.1/45.1 KB 3.9 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting py-solc-x==1.1.1
  Downloading py_solc_x-1.1.1-py3-none-any.whl (15 kB)
Collecting certifi==2022.9.24
  Downloading certifi-2022.9.24-py3-none-any.whl (161 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 161.1/161.1 KB 5.5 MB/s eta 0:00:00
Collecting click==8.1.3
  Downloading click-8.1.3-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 KB 6.7 MB/s eta 0:00:00
Collecting netaddr==0.8.0
  Downloading netaddr-0.8.0-py2.py3-none-any.whl (1.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 11.8 MB/s eta 0:00:00
Collecting ipfshttpclient==0.8.0a2
  Downloading ipfshttpclient-0.8.0a2-py3-none-any.whl (82 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.6/82.6 KB 6.9 MB/s eta 0:00:00
Collecting base58==2.1.1
  Downloading base58-2.1.1-py3-none-any.whl (5.6 kB)
Collecting semantic-version==2.10.0
  Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting black==22.10.0
  Downloading black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 12.4 MB/s eta 0:00:00
Collecting mythx-models==1.9.1
  Downloading mythx_models-1.9.1-py2.py3-none-any.whl (82 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.4/82.4 KB 5.8 MB/s eta 0:00:00
Collecting psutil==5.9.2
  Downloading psutil-5.9.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 282.8/282.8 KB 6.0 MB/s eta 0:00:00
Collecting typing-extensions==4.4.0
  Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting multidict==6.0.2
  Downloading multidict-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.5/114.5 KB 7.9 MB/s eta 0:00:00
Collecting pyrsistent==0.18.1
  Downloading pyrsistent-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.8/115.8 KB 5.4 MB/s eta 0:00:00
Collecting pluggy==1.0.0
  Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting tomli==2.0.1
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting jsonschema==3.2.0
  Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.3/56.3 KB 4.8 MB/s eta 0:00:00
Collecting vvm==0.1.0
  Downloading vvm-0.1.0-py3-none-any.whl (11 kB)
Collecting aiosignal==1.2.0
  Downloading aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting rlp==2.0.1
  Downloading rlp-2.0.1-py2.py3-none-any.whl (20 kB)
Collecting pygments-lexer-solidity==0.7.0
  Downloading pygments-lexer-solidity-0.7.0.tar.gz (7.3 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting urllib3==1.26.12
  Downloading urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.4/140.4 KB 6.0 MB/s eta 0:00:00
Collecting async-timeout==4.0.2
  Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting cytoolz==0.12.0
  Downloading cytoolz-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 9.5 MB/s eta 0:00:00
Collecting inflection==0.5.0
  Downloading inflection-0.5.0-py2.py3-none-any.whl (5.8 kB)
Collecting pytest-forked==1.4.0
  Downloading pytest_forked-1.4.0-py3-none-any.whl (4.9 kB)
Collecting pyyaml==5.4.1
  Downloading PyYAML-5.4.1.tar.gz (175 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 KB 10.3 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [62 lines of output]
      /tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!

              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.

              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 314, in run
          self.find_sources()
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
          mm.run()
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 551, in run
          self.add_defaults()
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
        File "<string>", line 201, in get_source_files
        File "/tmp/pip-build-env-24_rif1i/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

How can it be fixed?

Perhaps pinning PyYaml to any version >= 6.0.0 should fix this issue

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 13
  • Comments: 21 (1 by maintainers)

Most upvoted comments

Workaround: pip install "cython<3.0.0" && pip install --no-build-isolation eth-brownie

We should downgrading PyYAML to 5.3.1 due to 5.4.1 failing to build for Cython<3

hot fix for pip: pip install “cython<3.0.0” && pip install --no-build-isolation pyyaml==5.4.1 pip install eth-brownie

Is eth-brownie even actively maintained ?

+1

For poetry install eth-brownie=^1.19.3. It works fine with Python 3.8 and 3.9, but 3.10 fails because of pyyaml==5.4.1 😦

Interestingly, for some reason using poetry 1.4.2 works fine on my local machine (M1 mac) but fails on a ubuntu github actions run, while poetry 1.5.1 fails on everything. Doubly interesting is this only started happening recently, both runs below happen with the same poetry.lock dependencies and poetry version (1.5.1): Screenshot 2023-07-22 at 13 11 36

Screenshot 2023-07-22 at 13 13 04

Agree that a fix could be to do pyyaml=^6.0.0 rather than pinning to specifically v5.4.1.

Workaround

cython<3.0.0
web3==5.31.3
py-solc-x==1.1.1
eth-brownie==1.19.3

Support for 3.10-3.12 added in v1.20.0. But also @liam-ot is correct, this project is no longer actively maintained.

eth-brownie is no longer maintained, it should not be used

ape is the successor of eth-brownie you can view a tutorial on how to port over to ape from brownie here

also here is the discord for the ape framework

+1

I have tried all solutions advised above and online and none works for me, even after I tried different Python versions from 3.9 to 3.11. Disappointed and I may stay away from Brownie. The developer should make the installation easy at the first place.

eth-brownie or eth-ape with pyethash are unable to be installed and run seriously, one day that will be no longer maintained, so don’t lose your time to repair the zombie codes coming from PyPi.org or academy.apeworx.io Try to build you own solution to save your time. Mainly that must come from github, not others websites.