Python Compiler for Solidity on Raspberry Pi 4

Viewed 50

Am looking to compile Solidity contract into the Python language. Was directed to run the following command on my Raspberry Pi 4, "pip install py-solc-x". The output is as follows:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: py-solc-x in /home/talbot-raspberry/.local/lib/python3.9/site-packages (1.1.1) Requirement already satisfied: requests<3,>=2.19.0 in /usr/lib/python3/dist-packages (from py-solc-x) (2.25.1) Requirement already satisfied: semantic-version<3,>=2.8.1 in /home/talbot-raspberry/.local/lib/python3.9/site-packages (from py-solc-x) (2.10.0)

That leads me to believe that py-solc-x is ready to compile my Solidity. However, when looking to print and running the python deploy.py command.

deploy.py is the file name

I would then receive the following output:

Traceback (most recent call last): File "/home/talbot-raspberry/demos/web3_py_simple_storage/deploy.py", line 8, in compiled_sol = compile_standard( File "/home/talbot-raspberry/.local/lib/python3.9/site-packages/solcx/main.py", line 371, in compile_standard solc_binary = get_executable(solc_version) File "/home/talbot-raspberry/.local/lib/python3.9/site-packages/solcx/install.py", line 194, in get_executable raise SolcNotInstalled( solcx.exceptions.SolcNotInstalled: solc 0.6.0 has not been installed. Use solcx.install_solc('0.6.0') to install.

This lead me to look for a Raspberry Pi 4 compatible download. Even after downloading through the below github link, am still running into the same outputs.

https://github.com/iamdefinitelyahuman/py-solc-x/issues/86#issuecomment-1164832763

What would be your suggested course of action? Thank you!

0 Answers
Related