How to change default python executable on Windows 10?
I have an installation of python on my C drive, but since I have no admin rights I am unable to install modules into the same.
error: could not create 'C:Program FilesPython36Libsite-packagesyaml': Access is denied
I tried making a copy of the Python directory on the D folder and I changed the User environment variables to my path
D:Program FilesPython36
But when I use python
in the command prompt the python exe file in the C drive is executed and not the one in the D drive.
This same issue is arising in Visual Studio Code. Only the Python interpreter in C drive can be selected, the copy in the D drive is not shown.
The system environment path points to the python directory in C drive and cannot be changed (due to lack of admin rights), but the user enviroment variables are set to the python directory in D drive.
How can I make the python exe file in D drive as my default interpreter?
The account environment variable and path is attached
environment variable
Path
windows-10 command-line python3
add a comment |
I have an installation of python on my C drive, but since I have no admin rights I am unable to install modules into the same.
error: could not create 'C:Program FilesPython36Libsite-packagesyaml': Access is denied
I tried making a copy of the Python directory on the D folder and I changed the User environment variables to my path
D:Program FilesPython36
But when I use python
in the command prompt the python exe file in the C drive is executed and not the one in the D drive.
This same issue is arising in Visual Studio Code. Only the Python interpreter in C drive can be selected, the copy in the D drive is not shown.
The system environment path points to the python directory in C drive and cannot be changed (due to lack of admin rights), but the user enviroment variables are set to the python directory in D drive.
How can I make the python exe file in D drive as my default interpreter?
The account environment variable and path is attached
environment variable
Path
windows-10 command-line python3
add a comment |
I have an installation of python on my C drive, but since I have no admin rights I am unable to install modules into the same.
error: could not create 'C:Program FilesPython36Libsite-packagesyaml': Access is denied
I tried making a copy of the Python directory on the D folder and I changed the User environment variables to my path
D:Program FilesPython36
But when I use python
in the command prompt the python exe file in the C drive is executed and not the one in the D drive.
This same issue is arising in Visual Studio Code. Only the Python interpreter in C drive can be selected, the copy in the D drive is not shown.
The system environment path points to the python directory in C drive and cannot be changed (due to lack of admin rights), but the user enviroment variables are set to the python directory in D drive.
How can I make the python exe file in D drive as my default interpreter?
The account environment variable and path is attached
environment variable
Path
windows-10 command-line python3
I have an installation of python on my C drive, but since I have no admin rights I am unable to install modules into the same.
error: could not create 'C:Program FilesPython36Libsite-packagesyaml': Access is denied
I tried making a copy of the Python directory on the D folder and I changed the User environment variables to my path
D:Program FilesPython36
But when I use python
in the command prompt the python exe file in the C drive is executed and not the one in the D drive.
This same issue is arising in Visual Studio Code. Only the Python interpreter in C drive can be selected, the copy in the D drive is not shown.
The system environment path points to the python directory in C drive and cannot be changed (due to lack of admin rights), but the user enviroment variables are set to the python directory in D drive.
How can I make the python exe file in D drive as my default interpreter?
The account environment variable and path is attached
environment variable
Path
windows-10 command-line python3
windows-10 command-line python3
edited Jan 30 at 4:34
Adnan Arif Sait
asked Jan 29 at 8:07
Adnan Arif SaitAdnan Arif Sait
61
61
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This is most likely due to the path variable. You can see this in a command window by typing
Path
at your prompt.
To update the settings,
- Open the 'System' properties.
- Open Environment Variables
- Highlight the 'Path' Variable and click edit.
- Edit the values for the Python entries, to point to the desired python version.
- OK on all boxes, close any CMD windows open, and open new one. Python command should now reference the correct location.
Solution refers to Windows 10, but is essentially the same on Windows 7 +
1
I have made the changes in PATH for the user the path points to the desired python interpreter, but I cannot change the system variables. Still when I run python command the earlier (C drive) interpreter is used
– Adnan Arif Sait
Jan 29 at 8:49
1
Try a reboot if you haven't already... How are you launching the python file?
– Stese
Jan 29 at 9:05
1
I've tried rebooting, but to no gain. I run the python executable using "python" command and tried installing module using "python setup.py install"
– Adnan Arif Sait
Jan 29 at 11:03
1
Hmm, Can you screenshot the path variable?
– Stese
Jan 29 at 11:35
1
I have attached the screenshot of the path variable in the question
– Adnan Arif Sait
Jan 30 at 4:35
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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%2fsuperuser.com%2fquestions%2f1399544%2fhow-to-change-default-python-executable-on-windows-10%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is most likely due to the path variable. You can see this in a command window by typing
Path
at your prompt.
To update the settings,
- Open the 'System' properties.
- Open Environment Variables
- Highlight the 'Path' Variable and click edit.
- Edit the values for the Python entries, to point to the desired python version.
- OK on all boxes, close any CMD windows open, and open new one. Python command should now reference the correct location.
Solution refers to Windows 10, but is essentially the same on Windows 7 +
1
I have made the changes in PATH for the user the path points to the desired python interpreter, but I cannot change the system variables. Still when I run python command the earlier (C drive) interpreter is used
– Adnan Arif Sait
Jan 29 at 8:49
1
Try a reboot if you haven't already... How are you launching the python file?
– Stese
Jan 29 at 9:05
1
I've tried rebooting, but to no gain. I run the python executable using "python" command and tried installing module using "python setup.py install"
– Adnan Arif Sait
Jan 29 at 11:03
1
Hmm, Can you screenshot the path variable?
– Stese
Jan 29 at 11:35
1
I have attached the screenshot of the path variable in the question
– Adnan Arif Sait
Jan 30 at 4:35
add a comment |
This is most likely due to the path variable. You can see this in a command window by typing
Path
at your prompt.
To update the settings,
- Open the 'System' properties.
- Open Environment Variables
- Highlight the 'Path' Variable and click edit.
- Edit the values for the Python entries, to point to the desired python version.
- OK on all boxes, close any CMD windows open, and open new one. Python command should now reference the correct location.
Solution refers to Windows 10, but is essentially the same on Windows 7 +
1
I have made the changes in PATH for the user the path points to the desired python interpreter, but I cannot change the system variables. Still when I run python command the earlier (C drive) interpreter is used
– Adnan Arif Sait
Jan 29 at 8:49
1
Try a reboot if you haven't already... How are you launching the python file?
– Stese
Jan 29 at 9:05
1
I've tried rebooting, but to no gain. I run the python executable using "python" command and tried installing module using "python setup.py install"
– Adnan Arif Sait
Jan 29 at 11:03
1
Hmm, Can you screenshot the path variable?
– Stese
Jan 29 at 11:35
1
I have attached the screenshot of the path variable in the question
– Adnan Arif Sait
Jan 30 at 4:35
add a comment |
This is most likely due to the path variable. You can see this in a command window by typing
Path
at your prompt.
To update the settings,
- Open the 'System' properties.
- Open Environment Variables
- Highlight the 'Path' Variable and click edit.
- Edit the values for the Python entries, to point to the desired python version.
- OK on all boxes, close any CMD windows open, and open new one. Python command should now reference the correct location.
Solution refers to Windows 10, but is essentially the same on Windows 7 +
This is most likely due to the path variable. You can see this in a command window by typing
Path
at your prompt.
To update the settings,
- Open the 'System' properties.
- Open Environment Variables
- Highlight the 'Path' Variable and click edit.
- Edit the values for the Python entries, to point to the desired python version.
- OK on all boxes, close any CMD windows open, and open new one. Python command should now reference the correct location.
Solution refers to Windows 10, but is essentially the same on Windows 7 +
answered Jan 29 at 8:19
SteseStese
947414
947414
1
I have made the changes in PATH for the user the path points to the desired python interpreter, but I cannot change the system variables. Still when I run python command the earlier (C drive) interpreter is used
– Adnan Arif Sait
Jan 29 at 8:49
1
Try a reboot if you haven't already... How are you launching the python file?
– Stese
Jan 29 at 9:05
1
I've tried rebooting, but to no gain. I run the python executable using "python" command and tried installing module using "python setup.py install"
– Adnan Arif Sait
Jan 29 at 11:03
1
Hmm, Can you screenshot the path variable?
– Stese
Jan 29 at 11:35
1
I have attached the screenshot of the path variable in the question
– Adnan Arif Sait
Jan 30 at 4:35
add a comment |
1
I have made the changes in PATH for the user the path points to the desired python interpreter, but I cannot change the system variables. Still when I run python command the earlier (C drive) interpreter is used
– Adnan Arif Sait
Jan 29 at 8:49
1
Try a reboot if you haven't already... How are you launching the python file?
– Stese
Jan 29 at 9:05
1
I've tried rebooting, but to no gain. I run the python executable using "python" command and tried installing module using "python setup.py install"
– Adnan Arif Sait
Jan 29 at 11:03
1
Hmm, Can you screenshot the path variable?
– Stese
Jan 29 at 11:35
1
I have attached the screenshot of the path variable in the question
– Adnan Arif Sait
Jan 30 at 4:35
1
1
I have made the changes in PATH for the user the path points to the desired python interpreter, but I cannot change the system variables. Still when I run python command the earlier (C drive) interpreter is used
– Adnan Arif Sait
Jan 29 at 8:49
I have made the changes in PATH for the user the path points to the desired python interpreter, but I cannot change the system variables. Still when I run python command the earlier (C drive) interpreter is used
– Adnan Arif Sait
Jan 29 at 8:49
1
1
Try a reboot if you haven't already... How are you launching the python file?
– Stese
Jan 29 at 9:05
Try a reboot if you haven't already... How are you launching the python file?
– Stese
Jan 29 at 9:05
1
1
I've tried rebooting, but to no gain. I run the python executable using "python" command and tried installing module using "python setup.py install"
– Adnan Arif Sait
Jan 29 at 11:03
I've tried rebooting, but to no gain. I run the python executable using "python" command and tried installing module using "python setup.py install"
– Adnan Arif Sait
Jan 29 at 11:03
1
1
Hmm, Can you screenshot the path variable?
– Stese
Jan 29 at 11:35
Hmm, Can you screenshot the path variable?
– Stese
Jan 29 at 11:35
1
1
I have attached the screenshot of the path variable in the question
– Adnan Arif Sait
Jan 30 at 4:35
I have attached the screenshot of the path variable in the question
– Adnan Arif Sait
Jan 30 at 4:35
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f1399544%2fhow-to-change-default-python-executable-on-windows-10%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