Issue
I am trying to exit from the virtual environment which I have created for running my Django application. Now I am not able to exit from it. I have tried all the command deactivate, source deactivate, exit (just to make sure anything works in my case). I have even deleted all the virtual environments as I am not able to exit. But still, I am not able to exit from it.
Environment: Python 3.7.2 ( not anaconda), Windows OS
Thanks in advance.
below is the error message:
deactivate : The term 'deactivate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + deactivate + ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (deactivate:String) [], CommandNotFoundE
xception + FullyQualifiedErrorId : CommandNotFoundException
Solution
Deactivate is not a Python command but a shell command. You have to activate/deactivate terminal shell environment, not within Python shell.
Answered By - arryph Answer Checked By - Katrina (WPSolving Volunteer)