full-blockchain-solidity-course-py icon indicating copy to clipboard operation
full-blockchain-solidity-course-py copied to clipboard

Lesson 4 : installing solc

Open LouCse59 opened this issue 2 years ago • 1 comments

Hey, having a problem with solc-x version "solc 0.6.0 has not been installed" from lesson 4. I already changed the lines, my code is the exact same from the github under the video:

"import json

from web3 import Web3

from solcx import compile_standard, install_solc import os from dotenv import load_dotenv

load_dotenv()

with open("./SimpleStorage.sol", "r") as file: simple_storage_file = file.read()

print("Installing...") install_solc("0.6.0")

Solidity source code

compiled_sol = compile_standard( { "language": "Solidity", "sources": {"SimpleStorage.sol": {"content": simple_storage_file}}, "settings": { "outputSelection": { "": { "": ["abi", "metadata", "evm.bytecode", "evm.bytecode.sourceMap"] } } }, }, solc_version="0.6.0", )

LouCse59 avatar May 22 '22 21:05 LouCse59

Traceback (most recent call last): File "C:\Users\3\demos\web3_py_simple_storage\deploy.py", line 6, in install_solc(_solc_version) File "C:\Users\3\AppData\Local\Programs\Python\Python39\lib\site-packages\solcx\install.py", line 466, in install_solc
raise exc File "C:\Users\3\AppData\Local\Programs\Python\Python39\lib\site-packages\solcx\install.py", line 459, in install_solc
_validate_installation(version, solcx_binary_path) File "C:\Users\3\AppData\Local\Programs\Python\Python39\lib\site-packages\solcx\install.py", line 636, in _validate_installation raise SolcInstallationError( solcx.exceptions.SolcInstallationError: Downloaded binary would not execute, or returned unexpected output.

I keep getting this when i run the code using python deploy.py I'm using windows 10, don't know if that's the problem, please help i've been on this for 3 days.

oloridama avatar Jun 10 '22 12:06 oloridama