Install Python 3.10.5 using pyenv

Viewed 2403

I want to install Python 3.10.5 (or at least Python >= 3.7.). I followed these instructions:

# Step 1. Install pyenv

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc

# Step 2. Install missing headers for all the Python modules to be built

sudo zypper install readline-devel sqlite3-devel libbz2-devel

# Step 3. Install the desired Python version

pyenv install 3.10.5

until I got to pyenv install 3.10.5:

bscuser@localhost:~> pyenv install 3.10.5
/home/bscuser/.pyenv/plugins/python-build/share/python-build/3.7.13: line 1: prefer_openssl11: command not found

BUILD FAILED (openSUSE 15.3 using python-build 20180424)

I feel like it should be related to this file.

How do I solve this?

2 Answers

Yes, you can. Use pyenv update first then running pyenv install -list you should be able to see versions 3.10.4, 3.10.5 and even 3.10.6 now

I don't think that's possible. Running pyenv install -list will give you a list of all possible python versions that can be installed, and it will only go as far as 3.10.4 as of this writing.

Related