Skip to content

How to quit/exit/deactivate a Python Virtualenv

Category
Python
Versions & support
About Python →

The Python virtual environment provides a command “deactivate” to go back to normal. Once the virtualenv is activated, you simply run the below command to deactivate the environment and get the original shell back.

deactivate 
Quit/Exit/Deactivate the Python Virtual Environment
Deactivate the Python Virtual Environment

In the case of using “Anaconda” run the following command to deactivate the conda environment.

conda deactivate

Reference: https://docs.python.org/3/library/venv.html

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top