1/5
## Compiling Vyper in Python We'll compile our Vyper code using the Vyper compiler. We can do this in a couple of different ways, but regardless of how we choose to compile our Vyper contract, we first need to download the Vyper compiler. The Vyper compiler is available on GitHub at: [https://github.com/vyperlang/vyper](https://github.com/vyperlang/vyper). We can install the Vyper compiler using the following command in our terminal: ```bash uv tool install vyper ``` After we install the Vyper compiler, we can compile our "favorites" Vyper contract using the following command: ```bash vyper favorites.vy ``` After we run this command, a large string of hexadecimal characters will be displayed in our terminal. This string of characters is the raw bytecode that will be sent to the blockchain. This bytecode represents our Vyper contract in a machine-readable form that can be executed by the blockchain.
A practical guide to compiling a Vyper contract using the terminal - This lesson demonstrates two ways to install the Vyper compiler using your terminal (pipx install Vyper or uv tool install Vyper), explains how to check the compiler version, and provides a detailed explanation of the bytecode that is generated when you compile a Vyper contract.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Python basics
Introduction to Web3.py
Introduction to Titanoboa
Introduction to Moccasin
How to create an ERC-20
How to test Python code and Vyper smart contract
How to deploy Vyper smart contracts on ZKsync using Moccasin
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on April 21, 2025
Duration: 2h 20min
Duration: 1h 51min
Duration: 58min
Duration: 2h 23min
Duration: 53min
Duration: 2h 24min
Duration: 28min
Duration: 1h 54min
Duration: 11min
Course Overview
About the course
Python basics
Introduction to Web3.py
Introduction to Titanoboa
Introduction to Moccasin
How to create an ERC-20
How to test Python code and Vyper smart contract
How to deploy Vyper smart contracts on ZKsync using Moccasin
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on April 21, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar