Python Forum
Upgrading from Python 3.7.2 to 3.7.3 then invoking Python from Windows CMD line
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Upgrading from Python 3.7.2 to 3.7.3 then invoking Python from Windows CMD line
#1
If you are a Windows user you may have been frustrated with the upgrade of Python from 3.7.2 to 3.7.3. After the update to 3.7.3 a command line call of Python in the Terminal window still invoked 3.7.2. What could be the problem? I checked the option to have the installer to add the Python interpreter to the PATH after all. Furthermore, I do this each time I install a new version of Python.

After examining the contents of the PATH environment variable in Windows (Win 10 in my case) the problem became apparent. Between 3.7.2 and 3.7.3 the default directory path to the python interpreter (Python.exe) changed. The new path was C:\Users\[Your User Name]\AppData\Local\Programs\Python\Python37-32. Prior to that it was C:\Users\[Your User Name]\AppData\Local\Programs\Python\Python37. The latter path was higher on the PATH hierarchy than the new one for 3.7.3. First I simply moved the 3.7.3 to the top of the hierarchy and re-tried the CMD line invocation of the Python command. Voila - problem solved. Python 3.7.3 came up (since Windows now finds Python.exe in the 3.7.3 path first)! Since I no longer have any need for older, deprecated interpreter versions, I then deleted the PATH entries for those versions.

Hope this saves some poor newbie souls some time and gray hairs!
Reply
#2
Use py.exe to start the right interpreter. Setting the Path is sh.....
You've installed Python 3.7.2 64 Bit and Python 3.7.3 32Bit. They have different install locations. py.exe is deliverd since Python 3.5 and can start also start Python 2.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trading Bot written in Python for Windows Pizzlew 1 49,145 Sep-26-2022, 04:42 PM
Last Post: snippsat
Exclamation Python 3.10.1 32 Windows setup Virus behavior SapG20211215 8 3,051 Dec-15-2021, 06:51 PM
Last Post: snippsat
  Updating to Python 3.10 on Windows rafaeldominiquini 4 14,455 Oct-12-2021, 01:59 AM
Last Post: Underscore
  PIL module and Python 2.7 under Windows 10 Lad 3 2,148 Jul-06-2021, 07:39 PM
Last Post: Lad
  Installing and using Python on windows has become a 2 week long nightmare ogg130 3 2,630 Jul-06-2021, 11:14 AM
Last Post: stevenD
  Run Python 3 script with the same command on Windows, Linux, and macOS? ssrobins 3 2,741 Nov-15-2020, 07:32 AM
Last Post: Gribouillis
  opening python from the command line takes a long time to load? abdulkaderanwar 4 2,976 Jun-22-2020, 03:42 AM
Last Post: abdulkaderanwar
  New to Python, trying to get it to workin Windows 10 gimpyLaz 3 2,408 Apr-16-2020, 09:51 PM
Last Post: ianpocks
  How to create a New line in a Text block in Blender software using Python 3.7? starzar 0 4,682 Jun-08-2019, 08:27 AM
Last Post: starzar
  Default python version on Windows (3.6.x vs 3.6.y) gramakri 1 2,452 May-04-2019, 10:36 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020