Each time that I compile a contract with truffle I get this error: (cmd)

# Compiling your contracts...
> Compiling .\contracts\HW.sol Error executing vyper: 'vyper' is not recognized as an internal or external command, operable program or batch file. Truffle v5.1.58 (core: 5.1.58) Node v14.15.1

Any Idea on how to fix it? I tried installing vyper v1.0.0 but nothing changed

  • I tried installing pip on windows and then I tried pip install vyper so I installed vyper but the issue stays
    – Newdude
    Dec 25 '20 at 19:40
  • Have you tried this tuto : medium.com/quiknode/… ?
    – clement
    Dec 26 '20 at 21:47
  • @clement nah I have changed OS ,I'm on linux now
    – Newdude
    Dec 28 '20 at 20:19

A very similar error appeared on my Ubuntu Vagrant VM after uninstalling and reinstalling truffle and then trying to run my truffle tests.

Error executing vyper
/bin/sh: vyper: command not found

My fix was:

sudo apt install python3-pip
pip install vyper

I then had to edit my path in ~/.profile so truffle could find vyper:

export PATH=$PATH:/home/vagrant/.local/bin

After that the error was gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.