so, you are using asdf
for multiple Python versions and when building it (i.e. asdf install python 3.8.13
), it gives you warnings:
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python curses extension was not compiled. Missing the ncurses lib?
WARNING: The Python ctypes extension was not compiled. Missing the libffi lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
WARNING: The Python lzma extension was not compiled. Missing the lzma lib?
means your system administrator have not installed dev packages (those containing headers) for such build to succeed
Let's cheat and skip reading docs on library dependencies and take list of dev related packages from Build-Depends
field of Ubuntu itself:
- our lovely DSC http://archive.ubuntu.com/ubuntu/pool/main/p/python3.10/python3.10_3.10.4-3.dsc (note, version may change of course)
- which is referenced from https://packages.ubuntu.com/jammy/python3.10-dev - this should not change and be source of truth
for me, list looks like:
apt-get install libbz2-dev libffi-dev libncursesw5-dev libreadline-dev libsqlite3-dev liblzma-dev libssl-dev
and restart the build again
asdf uninstall python 3.8.13; asdf install python 3.8.13
🕙[ 16:08:43 ] ❯ asdf uninstall python 3.8.13; asdf install python 3.8.13
No such version
python-build 3.8.13 /home/coolcold/.asdf/installs/python/3.8.13
Downloading Python-3.8.13.tar.xz...
-> https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tar.xz
Installing Python-3.8.13...
Installed Python-3.8.13 to /home/coolcold/.asdf/installs/python/3.8.13
Hooray!