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

Lesson 4: install_solc() does not work on Windows.

Open andrew-jisan-yoon opened this issue 3 years ago • 14 comments

install_solc("0.6.0") gives the following error:

ValueError: Installation of solidity is not supported on your platform (win32). Supported platforms are: darwin, linux

Anyone knows how to solve this issue?

andrew-jisan-yoon avatar May 06 '22 15:05 andrew-jisan-yoon

Which version of windows are you using?

oloridama avatar Jun 15 '22 17:06 oloridama

I am getting the same error when running deploy.py. Have installed solc using npm. Is there any resolution around this?

kriti0102 avatar Oct 07 '22 09:10 kriti0102

I am getting the same error when running deploy.py. Have installed solc using npm. Is there any resolution around this?

Upload your deploy script let me see

oloridama avatar Oct 07 '22 09:10 oloridama

My deploy script does nothing just installs solc:

from solcx import compile_standard, install_solc install_solc("0.8.17") #matched the version with the solc npm installed version

kriti0102 avatar Oct 07 '22 09:10 kriti0102

My deploy script does nothing just installs solc:

from solcx import compile_standard, install_solc

install_solc("0.8.17") #matched the version with the solc npm installed version

Try using version 0.6.0 if you'll get thesame error

oloridama avatar Oct 07 '22 09:10 oloridama

My deploy script does nothing just installs solc:

from solcx import compile_standard, install_solc

install_solc("0.8.17") #matched the version with the solc npm installed version

Also is your machine windows 10?

oloridama avatar Oct 07 '22 09:10 oloridama

With both versions, I get the same error. Yes machine is windows 10

kriti0102 avatar Oct 07 '22 09:10 kriti0102

With both versions, I get the same error. Yes machine is windows 10

Upload your solidity and deploy script so I can recreate the error

oloridama avatar Oct 07 '22 09:10 oloridama

Uploaded here: [https://github.com/kriti0102/Smart-Contract]

kriti0102 avatar Oct 07 '22 09:10 kriti0102

Also, after doing npm install -g solc. Did you add it to the path? I just observed when do solcjs --version it says "solcjs not recognized by internal or external command" though I installed globally. Not sure but maybe this is causing some issue.

kriti0102 avatar Oct 07 '22 10:10 kriti0102

Also, after doing npm install -g solc. Did you add it to the path? I just observed when do solcjs --version it says "solcjs not recognized by internal or external command" though I installed globally. Not sure but maybe this is causing some issue.

Uninstall it and then Reinstall it globally outside the current file path on windows power shell then run solc version to see if it's installed correctly.

oloridama avatar Oct 07 '22 12:10 oloridama

Uploaded here: [https://github.com/kriti0102/Smart-Contract]

I went through the scripts you uploaded, please what are you trying to achieve with the deploy.py script? Seems to me like you're just trying to install a solc version. If that is the case, you could just do that from your terminal. Also are you stuck on lesson 4 or you're building your own contract because I've been answering with lesson 4 in mind.

oloridama avatar Oct 07 '22 12:10 oloridama

For now I just want to compile the contract so I have just created a simple hello world contract and want to compile it. The issue I am facing is during compile. I tried using brownie initially but while doing brownie compile I get error saying solc not installed. So I thought of getting solc from npm though I installed it already via pip but it did not seem to work. I could not find a way to add the compiler somewhere in the brownie config. So I started to follow this tutorial but compile still seems to be an issue when I run deploy.py.

kriti0102 avatar Oct 07 '22 12:10 kriti0102

For now I just want to compile the contract so I have just created a simple hello world contract and want to compile it. The issue I am facing is during compile. I tried using brownie initially but while doing brownie compile I get error saying solc not installed. So I thought of getting solc from npm though I installed it already via pip but it did not seem to work. I could not find a way to add the compiler somewhere in the brownie config. So I started to follow this tutorial but compile still seems to be an issue when I run deploy.py.

Go through the discussion here, follow the steps to check if you have solc installed and add to path.

oloridama avatar Oct 07 '22 13:10 oloridama