Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade from Python 3.5 to 3.6?

My machine runs on Windows and I tried to find out about it but people only talk about mac and brew on other discussions. I want to ask if there is a command line which I need to write which can upgrade the core or I have to download 3.6 package from the official website and then uninstall the 3.5 and then install 3.6 (and I don't want to do that because it sounds mess to me)

I have 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)]

Any help?

like image 800
P.hunter Avatar asked May 19 '17 06:05

P.hunter


People also ask

How do I upgrade my Python version?

1. In your browser, navigate to the Python Releases for macOS page, on Python's official website. 2. Click the link to download the latest Python 3 release on your computer.

Is Python 3.6 still supported?

If you see 3.6 or earlier, by the end of December 2021, you'll no longer receive updates or bug fixes. To resolve that, you must upgrade to the latest version of Python. Because 3.6 will have reached End of Life (EOL), it will no longer receive bug fixes, even if they are critical.

How do I update Python 3.7 on Windows?

Updating Python in Windows Updating to a new Python version is easy on a computer running Windows. All you have to do is visit the Python downloads page and download the latest version. Clicking on the button will replace the existing version of Python with the new version.


3 Answers

If someone's using MacOS, Linux or WSL then can use asdf.

  1. Clone the asdf repository
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1
  1. Edit ~/.bashrc file and add $HOME/.asdf/asdf.sh

  2. Restart your terminal and you'll be able to use asdf

  3. In order to add the plugins, in your case Python, you can run this -

asdf plugin add python
  1. List all the versions of python -
asdf list all python
  1. Install the version as per your requirement (can install the latest one) -
asdf install python latest
  1. Set the installed version globally, locally (for a particular project) or for this particular shell .
asdf global python latest
like image 147
Germa Vinsmoke Avatar answered Oct 04 '22 05:10

Germa Vinsmoke


I think you have to download Python 3.6 package, but no need to uninstall the 3.5 Version (you can have both)

Keep in mind that the custom libraries you where using with python 3.5 have to be installed for 3.6 too, but you can do that with pip easily

Changing the interpreter from pycharm can be achieved when creating a new project:

enter image description here

or from default settings for an already created project:

enter image description here

like image 24
Norbert Forgacs Avatar answered Oct 04 '22 06:10

Norbert Forgacs


On Unix it would be fair enough to correct softlinks. On Windows as far as I see people resort to playing around with paths. Here is the most detailed answer.

like image 33
gonczor Avatar answered Oct 04 '22 06:10

gonczor