Not able to exit from virtual environment python django.(Tried Deactivate,source deactivate and exit nothing...
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
python django shell virtualenv
add a comment |
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
python django shell virtualenv
add a comment |
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
python django shell virtualenv
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
python django shell virtualenv
python django shell virtualenv
edited Dec 28 '18 at 16:40
Divya M
asked Dec 28 '18 at 16:18
Divya MDivya M
115
115
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Deactivate is not a Python command but a shell command. You have to activate/deactivate terminal shell environment, not within Python shell.
Thanks for response Arryph. I believe you are suggesting me to run this from shell, not from a python program. I am running this in command prompt as a shell command. I am not running it in python.
– Divya M
Dec 28 '18 at 16:40
ohh okay, try running with path, for examplevenvScriptsdeactivate
. replacevenv
with virtual environment directory name.
– arryph
Dec 28 '18 at 16:42
It's not giving any response and didn't exit from the virtual environment.
– Divya M
Dec 28 '18 at 17:00
can you please let us know, how are you making sure that virtual environment is not deactivated after runningdeactivate
command
– arryph
Dec 28 '18 at 17:19
PS C:ProgramDataDivya Mereddyatommysite - Github-Django> PSScriptsdeactivate PS C:ProgramDataDivya Mereddyatommysite - Github-Django> ..............AFter deactivate also its showing virtual environment name before my directory link. Also when I am running my python django program its giving me below error. " importError: Couldn't import Django. Are you sure it's installed and available on your P YTHONPATH environment variable? Did you forget to activate a virtual environment? "
– Divya M
Dec 28 '18 at 17:27
|
show 5 more comments
Change your directory to scripts and deactivate.
I appreciate your response. Can you elaborate it a little bit please. I am new to these all
– Divya M
Dec 28 '18 at 16:38
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53961361%2fnot-able-to-exit-from-virtual-environment-python-django-tried-deactivate-source%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Deactivate is not a Python command but a shell command. You have to activate/deactivate terminal shell environment, not within Python shell.
Thanks for response Arryph. I believe you are suggesting me to run this from shell, not from a python program. I am running this in command prompt as a shell command. I am not running it in python.
– Divya M
Dec 28 '18 at 16:40
ohh okay, try running with path, for examplevenvScriptsdeactivate
. replacevenv
with virtual environment directory name.
– arryph
Dec 28 '18 at 16:42
It's not giving any response and didn't exit from the virtual environment.
– Divya M
Dec 28 '18 at 17:00
can you please let us know, how are you making sure that virtual environment is not deactivated after runningdeactivate
command
– arryph
Dec 28 '18 at 17:19
PS C:ProgramDataDivya Mereddyatommysite - Github-Django> PSScriptsdeactivate PS C:ProgramDataDivya Mereddyatommysite - Github-Django> ..............AFter deactivate also its showing virtual environment name before my directory link. Also when I am running my python django program its giving me below error. " importError: Couldn't import Django. Are you sure it's installed and available on your P YTHONPATH environment variable? Did you forget to activate a virtual environment? "
– Divya M
Dec 28 '18 at 17:27
|
show 5 more comments
Deactivate is not a Python command but a shell command. You have to activate/deactivate terminal shell environment, not within Python shell.
Thanks for response Arryph. I believe you are suggesting me to run this from shell, not from a python program. I am running this in command prompt as a shell command. I am not running it in python.
– Divya M
Dec 28 '18 at 16:40
ohh okay, try running with path, for examplevenvScriptsdeactivate
. replacevenv
with virtual environment directory name.
– arryph
Dec 28 '18 at 16:42
It's not giving any response and didn't exit from the virtual environment.
– Divya M
Dec 28 '18 at 17:00
can you please let us know, how are you making sure that virtual environment is not deactivated after runningdeactivate
command
– arryph
Dec 28 '18 at 17:19
PS C:ProgramDataDivya Mereddyatommysite - Github-Django> PSScriptsdeactivate PS C:ProgramDataDivya Mereddyatommysite - Github-Django> ..............AFter deactivate also its showing virtual environment name before my directory link. Also when I am running my python django program its giving me below error. " importError: Couldn't import Django. Are you sure it's installed and available on your P YTHONPATH environment variable? Did you forget to activate a virtual environment? "
– Divya M
Dec 28 '18 at 17:27
|
show 5 more comments
Deactivate is not a Python command but a shell command. You have to activate/deactivate terminal shell environment, not within Python shell.
Deactivate is not a Python command but a shell command. You have to activate/deactivate terminal shell environment, not within Python shell.
answered Dec 28 '18 at 16:26
arrypharryph
45127
45127
Thanks for response Arryph. I believe you are suggesting me to run this from shell, not from a python program. I am running this in command prompt as a shell command. I am not running it in python.
– Divya M
Dec 28 '18 at 16:40
ohh okay, try running with path, for examplevenvScriptsdeactivate
. replacevenv
with virtual environment directory name.
– arryph
Dec 28 '18 at 16:42
It's not giving any response and didn't exit from the virtual environment.
– Divya M
Dec 28 '18 at 17:00
can you please let us know, how are you making sure that virtual environment is not deactivated after runningdeactivate
command
– arryph
Dec 28 '18 at 17:19
PS C:ProgramDataDivya Mereddyatommysite - Github-Django> PSScriptsdeactivate PS C:ProgramDataDivya Mereddyatommysite - Github-Django> ..............AFter deactivate also its showing virtual environment name before my directory link. Also when I am running my python django program its giving me below error. " importError: Couldn't import Django. Are you sure it's installed and available on your P YTHONPATH environment variable? Did you forget to activate a virtual environment? "
– Divya M
Dec 28 '18 at 17:27
|
show 5 more comments
Thanks for response Arryph. I believe you are suggesting me to run this from shell, not from a python program. I am running this in command prompt as a shell command. I am not running it in python.
– Divya M
Dec 28 '18 at 16:40
ohh okay, try running with path, for examplevenvScriptsdeactivate
. replacevenv
with virtual environment directory name.
– arryph
Dec 28 '18 at 16:42
It's not giving any response and didn't exit from the virtual environment.
– Divya M
Dec 28 '18 at 17:00
can you please let us know, how are you making sure that virtual environment is not deactivated after runningdeactivate
command
– arryph
Dec 28 '18 at 17:19
PS C:ProgramDataDivya Mereddyatommysite - Github-Django> PSScriptsdeactivate PS C:ProgramDataDivya Mereddyatommysite - Github-Django> ..............AFter deactivate also its showing virtual environment name before my directory link. Also when I am running my python django program its giving me below error. " importError: Couldn't import Django. Are you sure it's installed and available on your P YTHONPATH environment variable? Did you forget to activate a virtual environment? "
– Divya M
Dec 28 '18 at 17:27
Thanks for response Arryph. I believe you are suggesting me to run this from shell, not from a python program. I am running this in command prompt as a shell command. I am not running it in python.
– Divya M
Dec 28 '18 at 16:40
Thanks for response Arryph. I believe you are suggesting me to run this from shell, not from a python program. I am running this in command prompt as a shell command. I am not running it in python.
– Divya M
Dec 28 '18 at 16:40
ohh okay, try running with path, for example
venvScriptsdeactivate
. replace venv
with virtual environment directory name.– arryph
Dec 28 '18 at 16:42
ohh okay, try running with path, for example
venvScriptsdeactivate
. replace venv
with virtual environment directory name.– arryph
Dec 28 '18 at 16:42
It's not giving any response and didn't exit from the virtual environment.
– Divya M
Dec 28 '18 at 17:00
It's not giving any response and didn't exit from the virtual environment.
– Divya M
Dec 28 '18 at 17:00
can you please let us know, how are you making sure that virtual environment is not deactivated after running
deactivate
command– arryph
Dec 28 '18 at 17:19
can you please let us know, how are you making sure that virtual environment is not deactivated after running
deactivate
command– arryph
Dec 28 '18 at 17:19
PS C:ProgramDataDivya Mereddyatommysite - Github-Django> PSScriptsdeactivate PS C:ProgramDataDivya Mereddyatommysite - Github-Django> ..............AFter deactivate also its showing virtual environment name before my directory link. Also when I am running my python django program its giving me below error. " importError: Couldn't import Django. Are you sure it's installed and available on your P YTHONPATH environment variable? Did you forget to activate a virtual environment? "
– Divya M
Dec 28 '18 at 17:27
PS C:ProgramDataDivya Mereddyatommysite - Github-Django> PSScriptsdeactivate PS C:ProgramDataDivya Mereddyatommysite - Github-Django> ..............AFter deactivate also its showing virtual environment name before my directory link. Also when I am running my python django program its giving me below error. " importError: Couldn't import Django. Are you sure it's installed and available on your P YTHONPATH environment variable? Did you forget to activate a virtual environment? "
– Divya M
Dec 28 '18 at 17:27
|
show 5 more comments
Change your directory to scripts and deactivate.
I appreciate your response. Can you elaborate it a little bit please. I am new to these all
– Divya M
Dec 28 '18 at 16:38
add a comment |
Change your directory to scripts and deactivate.
I appreciate your response. Can you elaborate it a little bit please. I am new to these all
– Divya M
Dec 28 '18 at 16:38
add a comment |
Change your directory to scripts and deactivate.
Change your directory to scripts and deactivate.
answered Dec 28 '18 at 16:27
BlackBoxSqlBlackBoxSql
227
227
I appreciate your response. Can you elaborate it a little bit please. I am new to these all
– Divya M
Dec 28 '18 at 16:38
add a comment |
I appreciate your response. Can you elaborate it a little bit please. I am new to these all
– Divya M
Dec 28 '18 at 16:38
I appreciate your response. Can you elaborate it a little bit please. I am new to these all
– Divya M
Dec 28 '18 at 16:38
I appreciate your response. Can you elaborate it a little bit please. I am new to these all
– Divya M
Dec 28 '18 at 16:38
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53961361%2fnot-able-to-exit-from-virtual-environment-python-django-tried-deactivate-source%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown