Compiler Error
Closed this issue · 2 comments
Hey,
Thank you for building this much needed tool, I am trying to use the auto-compiler for a contract that I wrote but I am getting the error in the screen below.
I am running VS code windows, and below are the results of the env export on miniconda, don't know if you used conda before 😅 . Also I didn't do any configuration when installing vscode I just installed the extension from the market place. Any help or direction could help 🙏 .
name: brownie
channels:
- defaults
dependencies:
- astroid=2.4.2=py37_0
- ca-certificates=2020.12.8=haa95532_0
- certifi=2020.12.5=py37haa95532_0
- colorama=0.4.4=py_0
- isort=5.6.4=py_0
- lazy-object-proxy=1.4.3=py37he774522_0
- mccabe=0.6.1=py37_1
- openssl=1.1.1i=h2bbff1b_0
- pip=20.3.1=py37haa95532_0
- pylint=2.6.0=py37_0
- python=3.7.9=h60c2a47_0
- setuptools=51.0.0=py37haa95532_2
- six=1.15.0=py37haa95532_0
- sqlite=3.33.0=h2a8f88b_0
- typed-ast=1.4.1=py37he774522_0
- vc=14.2=h21ff451_1
- vs2015_runtime=14.27.29016=h5e58377_2
- wheel=0.36.1=pyhd3eb1b0_0
- wincertstore=0.2=py37_0
- wrapt=1.11.2=py37he774522_0
- zlib=1.2.11=h62dcd97_4
- pip:
- apipkg==1.5
- appdirs==1.4.4
- asttokens==2.0.3
- base58==2.0.1
- bitarray==1.2.2
- black==19.10b0
- blake2b-py==0.1.3
- cached-property==1.5.2
- click==7.1.2
- cytoolz==0.11.0
- eth-abi==2.1.1
- eth-account==0.5.2
- eth-bloom==1.0.3
- eth-brownie==1.11.11
- eth-event==1.2.0
- eth-hash==0.2.0
- eth-keyfile==0.5.1
- eth-keys==0.3.3
- eth-rlp==0.2.1
- eth-typing==2.2.2
- eth-utils==1.9.5
- execnet==1.7.1
- hexbytes==0.2.1
- hypothesis==5.35.0
- inflection==0.5.0
- iniconfig==1.1.1
- ipfshttpclient==0.7.0a1
- ipython==7.19.0
- ipython-genutils==0.2.0
- jedi==0.17.2
- lru-dict==1.1.6
- more-itertools==8.6.0
- multiaddr==0.0.9
- mypy-extensions==0.4.3
- mythx-models==1.9.1
- netaddr==0.8.0
- parsimonious==0.8.1
- parso==0.7.1
- pathspec==0.8.0
- prompt-toolkit==3.0.7
- protobuf==3.13.0
- psutil==5.7.3
- py==1.9.0
- py-ecc==4.1.0
- py-geth==2.4.0
- py-solc-ast==1.2.5
- py-solc-x==1.0.0
- pycryptodome==3.9.8
- pygments==2.6.1
- pygments-lexer-solidity==0.5.1
- pyjwt==1.7.1
- pypiwin32==223
- pytest==6.0.1
- pytest-forked==1.3.0
- pytest-xdist==1.34.0
- pythx==1.6.1
- pywin32==228
- pyyaml==5.3.1
- regex==2020.10.28
- rlp==1.2.0
- semantic-version==2.8.5
- style==1.1.0
- termcolor==1.1.0
- toml==0.10.2
- toolz==0.11.1
- tqdm==4.48.2
- trie==2.0.0a5
- typing-extensions==3.7.4.3
- update==0.0.1
- varint==1.0.2
- vvm==0.1.0
- vyper==0.2.7
- web3==5.11.1
- websockets==8.1
- zipp==3.4.0
prefix: C:\kaleb\miniconda\envs\brownie
I had the same issue today on my new PC. The cause and solution were in my case the following (I'm working on a Windows PC):
Cause:
-
I used a virtual environment for my contract delevopment, therefore Vyper was only installed in the venv (by using pip install vyper).
-
Therefore, the vyper extension in VS Code was trying to use the shell command vyper to compile.
-
But this command only exists in the venv.
Solution:
-
Go to your venv folder and look for the vyper.exe file (venv -> scripts -> vyper.exe)
-
Copy the path to the exe file
-
Go in VS Code -> Settings -> Extensions -> Vyper -> Change vyper Command to the path (e.g. C:\dev\your_project.venv\Scripts\vyper.exe)
-
restart VS Code
Worked for me. Hope for you too.
PS: Or you jsut forgot to install the vyper compiler?
Can't thank you enough @mat774
If someone is using conda instead of venv use where your env file is saved C:\kaleb\miniconda\envs\brownie\Scripts