Open
Description
Hi, I've just started lesson 4 and I am having an issue. Running on mac.
Code:
from solcx import compile_standard, install_solc
with open("./SimpleStorage.sol", "r") as file:
simple_storage_file = file.read()
compiled_sol = compile_standard(
{
"language": "Solidity",
"sources": {"SimpleStorage.sol": {"content": simple_storage_file}},
"settings": {
"outputSelection": {
"*": {"*": ["abi", "metadata", "evm.bytecode", "evm.sourceMap"]}
}
},
},
solc_version="0.6.0",
)
print(compiled_sol)
And here is the error:
Traceback (most recent call last):
File "/Users/Corey/demos/web3_py_simple_storage/deploy.py", line 6, in <module>
compiled_sol = compile_standard(
^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/solcx/main.py", line 347, in compile_standard
solc_binary = get_executable(version=solc_version) if solc_binary is None else solc_binary
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/solcx/install.py", line 196, 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.
Metadata
Assignees
Labels
No labels
Activity