Pyenv’s python is missing bzip2 module

On Ubuntu 22 LTS Missing Library Problem in Python Installation with Pyenv Before the fix: $> pyenv install 3.11.0 command result: pyenv: /home/user/.pyenv/versions/3.11.0 already exists continue with installation? (y/N) y Downloading Python-3.11.0.tar.xz… -> https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tar.xz Installing Python-3.11.0… WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib? WARNING: The Python readline extension was not … Read more

missing python bz2 module

Probably as you built python from source, you don’t have bz2 headers. Install them on Ubuntu/Debian: sudo apt-get install libbz2-dev Fedora: sudo yum install bzip2-devel And build python again. You may notice that python checks for lots of libraries when configuring/building, if you miss some of them you probably will get no support for libs … Read more

tech