-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileNotFoundError: [WinError 2] The system cannot find the file specified #46
Comments
Can you add some checks for the solc executable and the source file? e.g.: import os
source_path = 'MetaCoin.sol'
if not os.path.exists(source_path):
raise FileNotFoundError("File not found at path: {0}".format(os.path.realpath(source_path))
if not os.path.exists('solc'):
raise FileNotFoundError("solc executable not found. Is solc installed?") |
Thanks for reply! It returns error:
I am still confused because the solc compiler was installed and it does work in commandline:
|
the solcjs package only gives the solc binary embedded in a js file behind js bindings. It wont work for py-solc, which requires the solc binary to be in the executable path. Unfortunately the handy py-solc installer helper does not work on windows:
You can download a compiled binary from https://github.com/ethereum/solidity/releases. Then either place the binary in you executable path, or set the |
Same issue. solc is available in the commond line , but throws exceptions by this snippet : if not os.path.exists('solc'):
raise FileNotFoundError("solc executable not found. Is solc installed?") Win7 solc:0.4.25+commit.59dbf8f1.Windows.msvc |
py-solc
Version: 2.1.0solc
Version: 0.4.17What was wrong?
I try to compile a contract like this:
Executing this function returns an error:
How can I fix it?
Cute Animal Picture
The text was updated successfully, but these errors were encountered: