I started a CMD window . Then when I typed ‘python’ to start the python interpreter, a new CMD window started, which is strange. Also, the ‘pip list’ command also started a new CMD window.
I have uninstall and reinstall python and also install other version including anaconda , They are doing the same thing.
you are starting new python interactive shell, so it’s not a cmd window. You can type valid python in it and it will be executed, unlike in a cmd.
Why specifically python interactive shell starts in a new window? Well, there could be a few reasons. First, if you try to run a python file from cmd, does it also start a new instance, or not?
Second, if you type python in the cmd, what happens?
Thrid, check in your PATH where py command is mapped to and what does it execute? Try to type “where py” and see what it prints
ok, then what is the output of “where py” in the cmd?
Also, check if python executable is run as admin. It seems that if the user account is not “admin” and python.exe is configured to run as admin, it will always open a new window.
interesting, it seems windows has changed the structure quite a lot. Check if this file is configured to run with administrator rights. If it is, try turning it off.
i try changing python.exe to run as admin but it was not working
i also go to the regedit under each folder i look for any where .py folder is and delete .DONT KNOW WHY I DID THIS. Who knows somt might have get wrong from the regedit.
it kinda works now after i reinstall the python 3.8.5. But conda still not working
do you have a requirement for python 3.8? I would try the latest version, which is 3.12.1, unless you have some dependencies specifically on 3.8. Perhaps it could solve the issue.
in that case the only things I can recommend are trying to remove “run as admin” from python executable and checking that you python file associations set up properly. If these don’t work, then I don’t know.