0

I installed official Python then Anaconda3 afterwards (both 3.9)

I suspect it is because I ticked 'Register Anaconda3 as my default Python 3.9' when I was installing Anaconda, that now when I type py -0p in cmd, the path goes to Anaconda (I do not have Anaconda in PATH). I would like Python 3.9 to use the official installation.

Installed Pythons found by py Launcher for Windows *
 -3.9-64        C:\Users\xxx\anaconda3\python.exe

What exactly did ticking 'Register Anaconda3 as my default Python 3.9' change in my system? I would like to revert it. I already looked for py.ini and it does not exist beside py.exe and %LOCALAPPDATA%, so it is not that.

tearfur
  • 57
  • 5
  • 1
    Does https://stackoverflow.com/questions/68121982/multiple-python-versions-installed-how-to-set-the-default-version-for-py-exe help? How about https://docs.python.org/3/using/windows.html#customizing-default-python-versions ? "the path goes to Anaconda" What exactly does this mean? Can you show the command output for `py -0p` (redact user names in paths if you wish), formatted as code? – Karl Knechtel Jan 20 '22 at 09:21
  • How about https://www.python.org/dev/peps/pep-0397/ ? – Karl Knechtel Jan 20 '22 at 09:25
  • @karl-knechtel They do not help, I have seen this, these only choose the versions but do not choose the python path to use for the selected version. I have found the solution though, I will update my question with command output so that others with the same problem can match my question to their issue. – tearfur Jan 20 '22 at 09:25
  • If you have found a solution, please feel free to [answer your own question](https://stackoverflow.com/help/self-answer). – Karl Knechtel Jan 20 '22 at 09:29

1 Answers1

0

With reference to this comment: py launcher does not find my Python 2.7, I deleted \HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.9 in regedit. py -0p gave this output after a reboot, which is what I wanted:

Installed Pythons found by py Launcher for Windows *
 -3.9-64        C:\Program Files\Python39\python.exe

My Python installation is system-wide, so the keys for the offical installation exist at \HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.9.

For those who installed Python for their user only, you may want to modify the keys in \HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.9 instead of deleting them.

tearfur
  • 57
  • 5