Installing python with Pyenv on Ubuntu

I keep running into the same issue (very likely a PEBKAC issue) when setting up pyenv - that of:

Downloading Python-3.12.4.tar.xz...
-> https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tar.xz
Installing Python-3.12.4...
Traceback (most recent call last):
   File "<string>", line 1, in <module>
   File "/home/coeus/.pyenv/versions/3.12.4/lib/python3.12/bz2.py", line 17, in <module>
      from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
Traceback (most recent call last):
   File "<string>", line 1, in <module>
   File "/home/coeus/.pyenv/versions/3.12.4/lib/python3.12/sqlite3/__init__.py", line 57, in <module>
      from sqlite3.dbapi2 import *
   File "/home/coeus/.pyenv/versions/3.12.4/lib/python3.12/sqlite3/dbapi2.py", line 27, in <module>
      from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?

If you run into it too - try installing the following packages:

sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev python-tk python3-tk tk-dev libbz2-dev libsqlite3-dev

That should be all the requirements fulfilled - try it again!

References

EMF

I spent last weekend in a field with near three thousand other like-minded hackers, nerds and all round lovely people.

Electromagnetic field is a camping festival held biannually ^(is biannually the right word, or is that twice a year?)^, for those with an inquisitive mind, or an interest in making things: hackers, artists, geeks, crafters, scientists, and engineers.

Name Change

I recently got married, and the aim for my wife and I has always been to double barrel our surnames.

Not just because we're super into equality and equity, but also because of the great joke that is being Mr and Dr Buck-Rogers.

Live scenes from our wedding.

Thankfully, I already own buck-rogers.co.uk, so perhaps I'll move the personal posts to there.