Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
This video will walk you through the creation of a virtual environment using venv and explore specific commands used in the process. You’ll also learn how to activate and deactivate a virtual environment in both macOS and Windows.
Resources
Commands
To create a Python virtual environment
-
python3 -m venv myapp-env
(macOS) -
python -m venv myapp-env
(Windows)
To activate a virtual environment
-
source myapp-env/bin/activate
(macOS) -
myapp-env\Scripts\activate
(Windows)
To deactivate a virtual environment
deactivate
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up