-
Notifications
You must be signed in to change notification settings - Fork 996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug-Candidate]: Can't install slither on python 3.11 #1466
Comments
Thanks for the report @alephao! A PR with a fix is open here: #1454. Many of the crytic tools have this dependency though, so it'll require updating several packages to achieve Python 3.11 compatibility. Related: #1463, crytic/solc-select#125 |
Oh, that's great, thanks for the quick reply! I searched for issues, but did not look into PRs, sorry if it's a duplicate! If there a list of thing that needs to be updated I'm happy to pick something to help |
pysha3 is outdated, please use https://docs.python.org/3/library/hashlib.html |
We haven't made a release so you will need to install the fix from pip using: |
In a previous commit we wre trying to upgrade Python version to `3.11.0`, but we discovered that the Slither installation does currently not work correctly when that version is used (there's an Issue created for that, see crytic/slither#1466). One of the recommended solutions is temporary downgrade to Python `3.10`.
In a previous commit we wre trying to upgrade Python version to `3.11.0`, but we discovered that the Slither installation does currently not work correctly when that version is used (there's an Issue created for that, see crytic/slither#1466). One of the recommended solutions is temporary downgrade to Python `3.10`.
In a previous commit we were trying to upgrade Python version to `3.11.0`, but we discovered that the Slither installation does currently not work correctly when that version is used (there's an Issue created for that, see crytic/slither#1466). One of the recommended solutions is temporary downgrade to Python `3.10`. We tested that, but for some reason, parameter was interpreted as `3.1`. Hence we're now using `3.10.8`, which is the highest `3.10.x` version and it is available for Ubuntu 22.04.
The `ubuntu-latest` runner used by us to run GH Actions jobs is getting migrated from Ubuntu `20.04` to `22.04` (actions/runner-images#6399). The `22.04` version does not work with the config of the `actions/setup-python@v4` action which we use in the jobs running slither. We were getting following failures in workflows: ``` Version 3.8.5 was not found in the local cache Error: Version 3.8.5 with arch x64 not found The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json ``` Based on actions/setup-python#555, we should upgrade Python version to `3.9.12` or higher. Or we could configure job to run on the hardcoded Ubuntu `20.04` runner. According to Slither documentation `Slither requires Python 3.8+ and solc, the Solidity compiler`, so upgrading to latest Python version (`3.11.0`) should be ok. We tried using this version, but another issue occurred: crytic/slither#1466. As recommended in the comments, we downgraded the Python version (to `3.10.8`, which is supported on Ubuntu `22.04`).
The `ubuntu-latest` runner used by us to run GH Actions jobs is getting migrated from Ubuntu `20.04` to `22.04` (actions/runner-images#6399). The `22.04` version does not work with the config of the `actions/setup-python@v4` action which we use in the jobs running slither. We were getting following failures in workflows: ``` Version 3.8.5 was not found in the local cache Error: Version 3.8.5 with arch x64 not found The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json ``` Based on actions/setup-python#555, we should upgrade Python version to `3.9.12` or higher. Or we could configure job to run on the hardcoded Ubuntu `20.04` runner. According to Slither documentation `Slither requires Python 3.8+ and solc, the Solidity compiler`, so upgrading to latest Python version (`3.11.0`) should be ok. We tried using this version, but another issue occurred: crytic/slither#1466. As recommended in the comments, we downgraded the Python version (to `3.10.8`, which is supported on Ubuntu `22.04`).
The `ubuntu-latest` runner used by us to run GH Actions jobs is getting migrated from Ubuntu `20.04` to `22.04` (actions/runner-images#6399). The `22.04` version does not work with the config of the `actions/setup-python@v4` action which we use in the jobs running slither. We were getting following failures in workflows: ``` Version 3.8.5 was not found in the local cache Error: Version 3.8.5 with arch x64 not found The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json ``` Based on actions/setup-python#555, we should upgrade Python version to `3.9.12` or higher. Or we could configure job to run on the hardcoded Ubuntu `20.04` runner. According to Slither documentation `Slither requires Python 3.8+ and solc, the Solidity compiler`, so upgrading to latest Python version (`3.11.0`) should be ok. We tried using this version, but another issue occurred: crytic/slither#1466. As recommended in the comments, we downgraded the Python version (to `3.10.8`, which is supported on Ubuntu `22.04`).
The `ubuntu-latest` runner used by us to run GH Actions jobs is getting migrated from Ubuntu `20.04` to `22.04` (actions/runner-images#6399). The `22.04` version does not work with the config of the `actions/setup-python@v4` action which we use in the jobs running slither. We were getting following failures in workflows: ``` Version 3.8.5 was not found in the local cache Error: Version 3.8.5 with arch x64 not found The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json ``` Based on actions/setup-python#555 (comment), we should update Python version to `3.9.12` or higher. Or we could configure job to run on the hardcoded Ubuntu 20.04 runner. According to Slither documentation `Slither requires Python 3.8+ and solc, the Solidity compiler`, so upgrading to latest Python version (`3.11.0`) should be ok. We tried doing that, but another issue occurred: crytic/slither#1466. As recommended in the comments, we downgraded the Python version (to `3.10.8`, which is supported on Ubuntu `22.04`). As part of this PR we're changing workflows configs so that the workflows would be triggered also on changes to their config. This should allow for testing of the aforementioned python version change. Refs: keep-network/coverage-pools#219 keep-network/tbtc-v2#423 threshold-network/solidity-contracts#131
I am having the same issue downgraded python to 3.10.8 but still nothing |
Is there a plan for a new release to include this fix? |
I ran into a similar issue trying to use slither-read-storage with Python 3.11. In my case it was related to an issue with the web3 package (ethereum/web3.py#2704), and was caught under the following exception I don't think there's anything to do here as it will be fixed on its own when the web3 pip package new release gets approved. Downgrading to Python 3.9 worked for me. |
Describe the issue:
One of my CI jobs started failing to install slither and it seems to happen because of the pysha3 dependency when using python > 3.11 : https://github.com/alephao/solidity-template/actions/runs/3440054726/jobs/5738065786
After freezing python to 3.10 it started working again: https://github.com/alephao/solidity-template/actions/runs/3440105452/jobs/5738181105
I had a look on pysha3 repository and looks like it is deprecated and the owner suggests using the
sha3
functions from thehashlib
module.Code example to reproduce the issue:
https://github.com/alephao/solidity-template/blob/ff2c556f185275a193b9f07006481ada73eb1c9d/.github/workflows/analyze.yml
Version:
0.9.1
Relevant log output:
The text was updated successfully, but these errors were encountered: