Initially, setting up Vyper (an experimental language, with python-like syntax, for writing smart contracts on ethereum) seemed as simple as following the instructions.
it wasn't.
If you like to skip the details/troubleshooting, head over to TL;DR
pyenv
I've written about why I prefer pyenv earlier
I'm not sure whether my “misfortune” was due to pyenv, but it could be.
To top it off, I also used virtualenv
as suggested in the official docs. (I
would have done that any way)
So it added to complications, and “simple” instructions did not work.
I had discussion on gitter about this issue, and one person had also faced
problems. (But he wasn't using virtualenv
)
Problems and Solutions
It seemed that missing requirements.txt
is the problem (and the in-progress documentation)
Several dependencies are not clearly listed.
First I ran into the following error, but the solution is well documented.
|
|
So I had to set the CFLAGS
and LDFLAGS
variable, as mentioned on the official instructions page.
While troubleshooting, I realized that dependencies are badly broken.
I manually installed py-evm
because it is listed in setup.py
This installed a whole lot of packages correctly which are required later.
e.g. This
troubleshooting guide, asks to install a specific version of pypandoc
.
When I did that, I saw several errors of the nature packageA requires pakcageB, which is not installed.
Yet, at the end I saw Successfully installed pypandoc-1.4
That does not make sense.
pip install py-evm
I think installed whole lot of those missing packages
correctly.
(Note: In my latest attempt to verify these instructions, make
worked after this)
Then I ran into error related to pytest-runner
|
|
Essentially it was trying to download pytest-runner, so first I tried curl using that URL (minus #sha256..) it worked. It dumped binary on the console. So there was no error reaching and downloading the file. So I manually pip install pytest-runner==4.2 After which make worked. (make test still failing, because I'm getting same error, but for ethereum)
I think it may have been “one off” error, cause in later attempts, I did not face this issue.
TL;DR : Steps that worked
As mentioned in the [official documentation]
(http://viper.readthedocs.io/en/latest/installing-vyper.html#macos) I already
had python 3.6 and gmp
installed via brew
|
|
Note : In the steps above, I've listed a specific versions of various packages I installed manually. Eventually, It was not required. So try without mentioning specific version at first. If that does not lead to success, maybe try specific version - which may differ depending on when you are reading this