Let's say you create a virtual environment for your Python project as below,
% cd ~/Desktop
% mkdir mypyproj
% cd mypyproj
% virtualenv mypyproj_venv
created virtual environment CPython3.11.4.final.0-64 in 258ms
Now to activate this virtual environment you run the below command,
Windows: mypyproj_venv\Scripts\activate
Linux/macOS
source mypyproj_venv/bin/activate
Once the virtual environment is active you will see your prompt something like the below,
(mypyproj_venv) Code2care@Mac %
Now to exit or deactivate the virtualenv simply type deactivate on the prompt.
deactivate
And you should be out of it!

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!