PatrickAlphaC / web3_py_simple_storage

47 stars 78 forks source link

raise OSError(f"Unsupported OS: '{sys.platform}' - py-solc-x supports Linux, OSX and Windows") #10

Closed FCardellino closed 2 years ago

FCardellino commented 2 years ago

Hello everybody! Thanks in advance for any help you could give me. I'm having trouble deploying the SimpleStorage.sol file. I'll give some context: OS: Linux Elementary OS Python Version: Python 3.5.2 (I created a virtual environment using the venv command)

After installing the py-solc-x package in the virtual environment, I imported it just like the video shows. However, when I execute "python deploy.py" in my Terminal, it shows me following error:

Traceback (most recent call last):
  File "web3_py_simple_storage/deploy.py", line 1, in <module>
    from solcx import compile_standard
  File "/home/demos/solidity-practice/lib/python3.5/site-packages/solcx/__init__.py", line 1, in <module>
    from solcx.install import (
  File "/home/demos/solidity-practice/lib/python3.5/site-packages/solcx/install.py", line 60
    raise OSError(f"Unsupported OS: '{sys.platform}' - py-solc-x supports Linux, OSX and Windows")
                                                                                                ^
SyntaxError: invalid syntax 

I don't know if it may be related to some incompatibility with the version of Python I'm using? Or perhaps I'm forgetting to install something else?

Again, any advice is welcome. Thanks!

FCardellino commented 2 years ago

I was able to solve it. In fact, it was the python's version I was using. Afetr installing python 3.8.10, the script executed normally