Installing python 3.5

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

user1584421

Posted 2017-09-20T12:37:54.073

Reputation: 109

Answers

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.

Anaksunaman

Posted 2017-09-20T12:37:54.073

Reputation: 9 278

Do you suggest a command line unistall or using the widows unistaller form the control panel? – user1584421 – 2017-09-20T13:06:20.287

Assuming that 2.7.5 appears in Add/Remove programs, that should be sufficient. Ditto for 3.5. – Anaksunaman – 2017-09-20T13:09:49.833

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 – 2017-09-20T13:59:56.820

1

Try uninstalling python and then use miniconda to install it.

Gy Tis

Posted 2017-09-20T12:37:54.073

Reputation: 11

Aliases don't work like that in Windows shells. – slhck – 2017-09-27T16:39:34.520

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 – 2017-09-27T16:49:04.720

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).

– Anaksunaman – 2017-10-01T19:33:51.460

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.

Tanner Martin

Posted 2017-09-20T12:37:54.073

Reputation: 1