How to Install Python for a Specific User on Linux (Without Root)
There are scenarios where you need a specific version of Python available for a particular user — without modifying the system-wide Python installation or requiring root access after the initial build. Installing Python under a user’s home directory is the cleanest way to achieve this.
This guide walks through downloading, compiling, and installing Python from source into a user-specific prefix.
Prerequisites
The build process requires a few development libraries. Install them as root before switching to the target user: