Skip to content

Instantly share code, notes, and snippets.

@ugovaretto
Created April 18, 2025 05:46
Show Gist options
  • Save ugovaretto/6efa47cf6ff31827eab8e8987a094e34 to your computer and use it in GitHub Desktop.
Save ugovaretto/6efa47cf6ff31827eab8e8987a094e34 to your computer and use it in GitHub Desktop.
Build python from source and install in home directory on Linux
./configure --prefix=~/.local -enable-optimizations --with-lto=full --prefix=$PWD/run --with-ensurepip --libdir=$PWD/run/lib
ln -sf ~/.local/lib64/python3.13/lib-dynload ~/.local/lib/python3.13/lib-dynload
# without the above line you'll get errors saying that the module _posixsubprocess cannot be found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment