How to install Python on platform where an official installer is not available

Hi, I’ve been asked a question to which I am not sure of the correct response: what is the correct way to install Python on platform where an installer is not available, for example Python 3.8 on Centos 7?

I know that Python is available as a source distribution but as far as I know there is no information in the documentation on what to do with it to get a production ready build from it, (e.g. should I run configure with --enable-optimizations, with --enable-ipv6, etc.). The only information about how to compile Python from source is in the dev guide but it may not be appropriate for a release build, and I would not expect users to look in the dev guide to find this information.

I’m also reluctant to tell users to rely on another third party repository that is not provided by their distribution or by Python.org as it may not be well managed.

Other projects, like PostgreSQL for example can be installed by the end user by building it from source and PG has a nice page in the documentation explaining the details of it : https://www.postgresql.org/docs/9.6/install-procedure.html.

So here’s my questions:

  • is building from source a good way for end users to install Python
  • if so, is git clone ..., ./configure --enable-optimizations , make -j, sudo make altinstall the correct way to do this?
  • should we add a page in the documentation explaining this?
1 Like