Python Basics- create, activate, deactivate and delete python virtual environment via VS-Code (MAC)

Sumit Kumar
3 min readFeb 19, 2024

This short introduction explores one of Python’s functionalities that allows us to work on different projects by keeping all their dependencies in one place via virtual environments

We will learn this by creating a new project folder and you can implement the same for your relevant projects.

How to create and start a virtual environment(MAC):

1. Create a new folder on your mac and open it via VS Code.
2. Once done open a new terminal on your VS Code.

3. Run the following command:
python3 -m venv test_venv (here test_env is the name for our virtual environment)
4. After running it successfully, you should now see some files generated on your left in VS Code. These files should be under a new folder with the same name as your new virtual environment.

5. Congratulations you have now successfully created a new virtual environment on your VS Code.

Moving forward we will now learn to Activate the environment we

--

--