How to update python

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?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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, Jarland