DEV Community

Aryan Absalan
Aryan Absalan

Posted on

Python’s Virtual Environments

execute the venv module, which is part of the Python standard library.
crating test-project folder
% cd test-project/
Creating an environment called venv
% python3 -m venv venv/

For activating the venv on Windows:
C:> \Scripts\activate.bat
installing the requirements of the project with:
pip install -r requirements.txt

You can deactivate a virtual environment by typing “deactivate”
you can Remove virtual environments using rm:
rm -r your_ENV

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️