How to update python

August 7, 2018 125 views
Python Ubuntu

I want to use python 3.7 but DigitalOcean pre-installs python 3.5.2, how can I upgrade to python 3.7 using the cli?

1 Answer

Hello friend!

Often those needing the latest version of packages will run non-LTS releases of a Linux distribution. This is not advised for production, but is frequently done for development. The versions shipped with the operating systems are the ones you can expect to receive any updates necessary from those that manage the distro, and any version you manually install will have it's updates managed by you. Keep that in mind before proceeding, as the simplest solution would be to use the version included if it offers the functionality that you need.

With that in mind, if you would like to proceed, I found a couple of options stated here:

Now, I'm assuming you're using Ubuntu. The steps can be different, depending on the chosen path (repo vs compiling source, for example) and the distro/version used.

Kind Regards,

Have another answer? Share your knowledge.