How to update python

Posted August 7, 2018 5.9k views

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?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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,