Frequently Asked Questions

General Questions

Required User Permissions

Python Version Support

Supported Linux Operating System Distributions

Uninstall Python3

Logging FAQ

Miscellaneous Questions


General Questions

Q: What is buildpy? Why do I care?

A: Seriously, you may not care, but if you use Linux, you probably should. buildpy is only a fantastic utility or tool for anyone who needs to install a specific version of Python on a Linux hardware, virtual machine, or container. It is also something anyone who has to remove and replace a version of Python in machine or machine image.

Q: What the main use cases for buildpy?

A: General use cases for buildpy are:

  1. Use buildpy to find out when new python X.Y version is available (below)
$ buildpy --show os-packages
  1. You want an easy to use, reliable means of compiling the latest version of Python after release from https://python.org.
$ buildpy --profile default --operation list        # list key information
  1. _Uninstall_: You need to install a version of Python3 you compiled on your machine (not a system Python that came with your distribution)

Back to Frequently Asked Questions top


Required User Permissions

Q: What permissions are required to compile and install python3 with buildpy?

A: It depends on what functionality you wish to invoke. buildpy runs the majority of operations under normal user permissions. The exception is when compiling and installing a new version of Python3. This is because buildpy installs a compiled version of Python3 for the entire system; thus, the --install operation requires root level permissions via sudo or assumed by running buildpy as root directly.

The following requires sudo or root permissions:

$ sudo  buildpy  --install  Python3.7  [ --optimizations ]

Q: What happens if I run buildpy as root?

A: In essence, nothing changes when you run buildpy directly as root. You are installing a new version of Python3 for the entire system either when running buildpy as sudo or directly via root permissions.

Back to Frequently Asked Questions top


Python Version Support

Q: What python3 versions can I compile and install with buildpy

A: It depends on what functionality you wish to invoke. buildpy runs the majority of operations under normal user permissions. The exception is when compiling and installing a new version of Python3. This is because buildpy installs a compiled version of Python3 for the entire system; thus, the --install operation requires root level permissions via sudo or assumed by running buildpy as root directly.

The following requires sudo or root permissions:

$ buildpy  --install  Python3.7  [ --optimizations ]

Back to Frequently Asked Questions top


Q: Why do I not just install python3 from my os distribution’s package repository insted of using buildpy?

A: That is a bit of a philosophical question, so let’s just stick to hard benefits that are widely accepted. The reason you would use buildpy to compile a custom version of python3 are:

  1. Compiled Python interpreters are reported to enjoy an approximate 10% execution speed improvement
  2. You care about upgrading to the latest minor Python3.7 revision when it is released (example: 3.7.2 to 3.7.3).
  3. You are required to run an older Python version (say, Python 3.4) and a modern machine for testing purposes
  4. You want to enable custom functionality not enabled in the Python3 binaries installed from your OS distribution’s package repository.

Back to Frequently Asked Questions top


Q: Does buildpy overwrite the old system-level Python3 version?

A: No. Let’s say you have Python3.4 installed by default on a Ubuntu 14.04 system. You want to install the latest Python3.4. At the completion of the installation, Python3.4 will still function for os-dependent subsystems.

Back to Frequently Asked Questions top


Supported Linux Operating System Distributions

Q: If buildpy is written in bash, I can run it on any Linux OS, right?

A: Yes and No actually, or as they say in situation like this: it depends.

It depends upon meeting the minimum requirements outlined in the depenencies section. Bash 4.4+ is required as well as a few other critical os packages such as sed, awk, and bc.

Back to Frequently Asked Questions top


Q: What Redhat-based distributions does buildpy install via an RPM package?

A: See the list here. buildpy is also compatible with Amazon Linux 2 when run on EC2 virtual machines.

Back to Frequently Asked Questions top


Uninstall Python3

Q: What Python3 versions can I safely remove from my system with buildpy?

A: As a built-in safeguard, buildpy will only remove compiled versions from your system. This is any python installed in /usr/local/. This is location of any python versions compiled from source.

Most if not all system-wide Python binaries install from your Linux distribution’s official package repository reside in /usr/bin; thus, buildpy avoids this location and will not remove python binaries from this location as a precaution.

To initiate the uninstall operation, type the following:

$ sudo buildpy --uninstall Python3.6

Back to Frequently Asked Questions top


Logging FAQ

Q: Which log files does buildpy write to?

A: buildpy produces the following log files:

  • /var/log/buildpy.log contains summary messages produced during normal operations
  • /var/log/console.log contains all console messages produced only during compile and install operations

Back to Frequently Asked Questions top


Miscellaneous Questions

Q: Since buildpy requires an Internet connection to download python binaries, does it send any information to you or anyone else?

A: None whatsoever. buildpy can actually function fine without any Internet connection if the python binaries are downloaded offline and placed in /tmp so that they used as the source during the install.

Back to Frequently Asked Questions top


Table Of Contents