Installing Vyper (original) (raw)
Take a deep breath, follow the instructions, and pleasecreate an issue if you encounter any errors.
Standalone¶
The Vyper CLI can be installed with any pip
compatible tool, for example, pipx
or uv tool
. If you do not have pipx
or uv
installed, first, go to the respective tool’s installation page:
- https://github.com/pypa/pipx?tab=readme-ov-file
- https://github.com/astral-sh/uv?tab=readme-ov-file#uv
Then, the command to install Vyper would be
Or,
Binaries¶
Alternatively, prebuilt Vyper binaries for Windows, Mac and Linux are available for download from the GitHub releases page: https://github.com/vyperlang/vyper/releases.
PIP¶
Installing 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.
Creating a virtual environment¶
Because pip installations are not isolated by default, this method of installation is meant for more experienced Python developers who are using Vyper as a library, or want to use it within a Python project with other pip dependencies.
It is strongly recommended to install Vyper in a virtual Python environment, so that new packages installed and dependencies built are strictly contained in your Vyper project and will not alter or affect your other development environment set-up. For easy virtualenv management, we recommend either pyenvor Poetry.
Installing Vyper¶
Each tagged version of vyper is uploaded to pypi, and can be installed using pip
:
To install a specific version use:
You can check if Vyper is installed completely or not by typing the following in your terminal/cmd:
Docker¶
Vyper can be downloaded as docker image from dockerhub:
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.
nix¶
View the versions supported through nix at nix package search
Note
The derivation for Vyper is located at nixpkgs
Installing Vyper¶
nix-env -iA nixpkgs.vyper