1/5
## Telling VS Code what our python environment is We've been working with our project, and we've run a command: ```bash uv deploy_favorites.vy ``` VS Code is telling us something important. We get a "yellow squiggly" error that says: > Import "vyper" could not be resolved PyLance (reportMissingImports) VS Code is saying "Hey, I'm currently looking for this vyper thing you're talking about, but I don't see it. I don't see this vyper package". We have the right environment for running our commands because we were able to print out compiled vyper bytecode. So VS Code doesn't know which python environment we're working with. We need to tell PyLance which python environment we're using: 1. We'll click the button to "Select Interpreter" 2. We'll select the "Recommended" option The recommended option will probably be our venv. For me, it's my global python environment, but yours will likely be different. We're going to switch the PyLance's interpreter path to our venv by clicking the venv that we're using. Now, the squiggly line will disappear, and we'll see a nice green color instead. What's going on? VS Code PyLance linter (or formatter) now knows which python environment we're working with. We're using the python in the venv folder. The reason we setup every project like this is to avoid clashes between projects. It allows each project to kind of run in its own isolated type of environment. If you don't like doing this, you can go ahead and install everything in your global environment. I don't recommend doing that because it'll make your life miserable. You do whatever you want to do.
A helpful guide to telling VS Code what your Python environment is. This lesson covers the basics of managing your Python environments in VS Code, including how to find the active environment, select a different interpreter, and manage your project dependencies.
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