0

I had python 2.7.5 installed and i wanted to upgrade to 3.5. So i went to the website and downloaded the installer. The installer installed python 3.5 succesully. In adidtion to that i selected the option to include python to the PATH global variable. I use windows 7.

However, i opened the cmd and typed:

python --version

I got:

Python 2.7.5

3 Answers 3

1

Based off the wording of your question, if you no longer intend to use 2.7.5, you should manually uninstall it as Python versions on Windows do not replace each other.

In this case, to ensure correct associations, you may also want to uninstall then re-install 3.5 if you would like those associations to be made with less fuss.

3
  • Do you suggest a command line unistall or using the widows unistaller form the control panel? Sep 20, 2017 at 13:06
  • Assuming that 2.7.5 appears in Add/Remove programs, that should be sufficient. Ditto for 3.5. Sep 20, 2017 at 13:09
  • You could also as an alternative manually modify the system variable to point to Python 3.5 instead of Python 2.7.5. This way you could still use Python 2.7.5 for those instances where Python 3.5 would otherwise be incompatible.
    – Ramhound
    Sep 20, 2017 at 13:59
1

Try uninstalling python and then use miniconda to install it.

3
  • Aliases don't work like that in Windows shells.
    – slhck
    Sep 27, 2017 at 16:39
  • Yes, sorry, I've edited my answer. I'm running python on Windows too and the only way to make it work properly was only with Anaconda. With Anaconda You can use different environments and even have the same version of python installed with different architectures (x32 and x64. I need x32 for work, because of compatibility issues, but usually use x64 on projects)
    – Gy Tis
    Sep 27, 2017 at 16:49
  • Just as a tiny FYI, it is actually possible to have multiple vanilla builds of Python on Windows with the default installers (including x32 and x64 architectures). Likewise, virtual environments are supported as well in later version of 3.x.. That said, I am sure the management environments for distros such as Anaconda/Miniconda can be extremely helpful (or perhaps even necessary, in some cases). Oct 1, 2017 at 19:33
0

I followed the same steps you did during the install of Python 3.5.

To fix this I removed the PATH under 'User variables for ' that the Python 3.5 had installed on setup.

I located the previous Python path which was instead under 'System variables.'

I then replaced the old python path C:\Python27 with the new Python path C:\Users\tanne\AppData\Local\Programs\Python\Python35

I do not want to delete any previous versions as some servers will never upgrade, and Python 2.7 comes in handy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .