autonity / aut

A command-line RPC client for Autonity
MIT License
11 stars 10 forks source link

Running into dependency issues when running aut for Autonity network's gamified testing #145

Closed etmjansen closed 6 months ago

etmjansen commented 6 months ago

Hello, I am running into python dependency issues trying to run aut to enter the Picadilly games. It seems aut depends on Python 3.12 which seems to miss another dependency on web3. I have no clue what the solution is. I have looked into Stackoverflow and 'asked' chatgpt which just regurgitates Stackoverflow. Any suggestions? I checked the install python3.12 that aut made does not include the web3 dependency. The error I get running aut is

aut --version Traceback (most recent call last): File "/Users/etmjansen/.local/bin/aut", line 5, in from aut.main import aut File "/Users/etmjansen/.local/pipx/venvs/aut/lib/python3.12/site-packages/aut/main.py", line 9, in from aut.commands import ( File "/Users/etmjansen/.local/pipx/venvs/aut/lib/python3.12/site-packages/aut/commands/account.py", line 8, in from web3.types import BlockIdentifier File "/Users/etmjansen/.local/pipx/venvs/aut/lib/python3.12/site-packages/web3/init.py", line 2, in import pkg_resources ModuleNotFoundError: No module named 'pkg_resources'

I did some digging as to what the dependency structure is and what is installed

python3.12 -m pip list Package Version


argcomplete 3.2.2 certifi 2024.2.2 packaging 23.2 pip 24.0 Pygments 2.17.2 setuptools 69.1.0 six 1.16.0 wheel 0.42.0

and

python3.12 Python 3.12.2 (main, Feb 11 2024, 17:09:38) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin Type "help", "copyright", "credits" or "license" for more information. import web3 Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'web3' import pkg_resources

:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html >

Was there a deprecation that was not addressed in the latest version of aut?

I am installing aut as instructed by Autonity with

pipx install --force git+https://github.com/autonity/aut

See https://docs.autonity.org/account-holders/setup-aut/#install.

aiman commented 6 months ago

This is a known issue, tracked in: https://github.com/autonity/aut/issues/138. In the meantime, the best suggestion is just to install Python 3.11, which is available alongside Python 3.12 in most distros. Then you can run: pipx install --python /usr/bin/python3.11 --force git+https://github.com/autonity/aut.