Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore[docs]: add binary installation methods #4258

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 36 additions & 28 deletions docs/installing-vyper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,20 @@ any errors.
The easiest way to experiment with the language is to use the `Remix online compiler <https://remix.ethereum.org>`_.
(Activate the vyper-remix plugin in the Plugin manager.)
DanielSchiavini marked this conversation as resolved.
Show resolved Hide resolved

Docker
******

Vyper can be downloaded as docker image from `dockerhub <https://hub.docker.com/r/vyperlang/vyper/tags?page=1&ordering=last_updated>`_:
::

docker pull vyperlang/vyper

To run the compiler use the ``docker run`` command:
::

docker run -v $(pwd):/code vyperlang/vyper /code/<contract_file.vy>

Alternatively you can log into the docker image and execute vyper on the prompt.
::

docker run -v $(pwd):/code/ -it --entrypoint /bin/bash vyperlang/vyper
root@d35252d1fb1b:/code# vyper <contract_file.vy>

The normal parameters are also supported, for example:
::
Binaries
********

docker run -v $(pwd):/code vyperlang/vyper -f abi /code/<contract_file.vy>
[{'name': 'test1', 'outputs': [], 'inputs': [{'type': 'uint256', 'name': 'a'}, {'type': 'bytes', 'name': 'b'}], 'constant': False, 'payable': False, 'type': 'function', 'gas': 441}, {'name': 'test2', 'outputs': [], 'inputs': [{'type': 'uint256', 'name': 'a'}], 'constant': False, 'payable': False, 'type': 'function', 'gas': 316}]
Vyper binaries for Windows, Mac and Linux are available for download from the `GitHub releases page
<https://github.com/vyperlang/vyper/releases>`_.

.. note::

If you would like to know how to install Docker, please follow their `documentation <https://docs.docker.com/get-docker/>`_.

PIP
***

Installing Python
=================

Vyper can only be built using Python 3.6 and higher. If you need to know how to install the correct version of python,
Vyper can only be built using Python 3.10 and higher. If you need to know how to install the correct version of python,
follow the instructions from the official `Python website <https://wiki.python.org/moin/BeginnersGuide/Download>`_.

Creating a virtual environment
Expand Down Expand Up @@ -76,13 +54,43 @@ Each tagged version of vyper is uploaded to `pypi <https://pypi.org/project/vype
To install a specific version use:
::

pip install vyper==0.3.7
pip install vyper==0.4.0

You can check if Vyper is installed completely or not by typing the following in your terminal/cmd:
::

vyper --version


Docker
******

Vyper can be downloaded as docker image from `dockerhub <https://hub.docker.com/r/vyperlang/vyper/tags?page=1&ordering=last_updated>`_:
::

docker pull vyperlang/vyper

To run the compiler use the ``docker run`` command:
::

docker run -v $(pwd):/code vyperlang/vyper /code/<contract_file.vy>

Alternatively you can log into the docker image and execute vyper on the prompt.
::

docker run -v $(pwd):/code/ -it --entrypoint /bin/bash vyperlang/vyper
root@d35252d1fb1b:/code# vyper <contract_file.vy>

The normal parameters are also supported, for example:
::

docker run -v $(pwd):/code vyperlang/vyper -f abi /code/<contract_file.vy>
[{'name': 'test1', 'outputs': [], 'inputs': [{'type': 'uint256', 'name': 'a'}, {'type': 'bytes', 'name': 'b'}], 'constant': False, 'payable': False, 'type': 'function', 'gas': 441}, {'name': 'test2', 'outputs': [], 'inputs': [{'type': 'uint256', 'name': 'a'}], 'constant': False, 'payable': False, 'type': 'function', 'gas': 316}]

.. note::

If you would like to know how to install Docker, please follow their `documentation <https://docs.docker.com/get-docker/>`_.

nix
***

Expand Down
Loading