Lesson 4: Import Error with solcx #156
-
Hello! I'm having some issues when trying to run "python deploy.py" at exactly the 3:44:49 mark in the course! Here is a copy of my code in VScode: `from solcx import compile_standard, install_solc install_solc("0.6.0") with open("./SimpleStorage.sol", "r") as file: compiled_sol = compile_standard( When I type "python deploy.py" into the terminal of VScode, I get this response in the terminal window: "Traceback (most recent call last): I have installed solcx already, as well. When I try the pip install py-solc-x command in terminal I get this response in the terminal window: "Requirement already satisfied: py-solc-x in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (1.1.0) Just trying to figure out how to proceed from here! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 21 replies
-
Could you please check the discussion here? #5 (comment) Marking as answer for now, let me know if that didn't work. |
Beta Was this translation helpful? Give feedback.
-
I'm running Ubuntu 20.04, and as Python 2 is installed, running 'python' in the terminal starts the Python 2 interpreter, which doesn't locate the installed solcx package. If you have a similar configuration you can resolve this by using 'python3' instead, or setting python 3 as default. Discussion here: https://askubuntu.com/questions/1232996/my-default-python-version-is-2-7-18rc1-after-upgrade-from-18-04-to-20-04 |
Beta Was this translation helpful? Give feedback.
-
I uninstalled and re-installed python. This did the trick for me. |
Beta Was this translation helpful? Give feedback.
Could you please check the discussion here? #5 (comment)
Marking as answer for now, let me know if that didn't work.