Might check this post, Seems to cover a few things you are missing that are not covered in the course video. In a nutshell...
add
install_solc
to the first line so it looks like this
from solcx import compile_standard, install_solc
Then add
install_solc("0.6.0")
Above this line
compile_sol = compile_standard(
So it looks like this
install_solc("0.6.0")
compile_sol = compile_standard(
At this stage in the course your code should look like this...
from solcx import compile_standard, install_solc
with open("./SimpleStorage.sol", "r") as file:
simple_storage_file = file.read()
# Compile our Solidity
install_solc("0.6.0")
compile_sol = compile_standard(
{
"language": "solidity",
"source": {"SimpleStorage.sol": {"content": simple_storage_file}},
"settings": {
"outputSelection": {
"*": {"*": ["abi", "metadata", "evm.bytecode", "evm.sourceMap"]}
}
},
},
solc_version="0.6.0",
)
print(compile_sol)
You might also want to checkout the GitHub for the course. There you will find an index for all the lessons. If you click a lesson you will find a link to the code at the top of each lesson... if you follow the link you can check the issues tab for issues raised to Patric for that lesson... Here is the issues link for this lesson
For myself when I do courses like this I like to clone the repository into another dir named 1-clone (so it is on top of everything else and not mixed into my other files/folders).
cd into the web3_py_simple_storage dir Patrick has you make at the start of the course and then
mkdir 1-clone
cd 1-clone
git clone https://github.com/PatrickAlphaC/web3_py_simple_storage
cd web3_py_simple_storage
This way you will have everything right there for you to check your code against.