How to Install Python 3.14.0 on Raspberry Pi Using Pyenv

Published October 15, 2025

How to install Python 3.14.0 on a Raspberry Pi 3 using pyenv How to install Python 3.14.0 on a Raspberry Pi 3 using pyenv

The latest version of Python is 3.14.0, and it was out on October 7, 2025.

This blog post contains steps to install Python 3.14.0 as well as 3.13.7 using pyenv on your Raspberry Pi. This tutorial will work for Raspberry Pi OS and DietPi, and probably other flavors as well.

What is pyenv and why would I use it?

pyenv is a tool that allows you to install and manage multiple versions of Python.

This is useful if you want to toggle between different versions of Python if you have applications that require different versions.

Install Python from scratch or pyenv?

Personally, I stick to one version of Python for all my needs on my Raspberry Pi computers. I also like to install Python from scratch on my Raspberry Pi computers.

However, at some point, for older versions of Raspberry Pis, you do find that the typical config, make and make install can take over an hour or just hang.

That's when I decided to use pyenv to install Python 3.14 and it installed without a problem on multiple Raspberry Pi computers.

What you need

  • Raspberry Pi 1, 2, 3, 4, 5
  • MicroSD card with at least 8GB
  • Raspberry Pi OS Lite / Desktop / DietPi

You will first have to install Raspberry Pi OS or an equivalent like Ubuntu Server or DietPi.

On which Raspberry Pi versions did I install Python 3.14 using pyenv?

I succcessfully installed Python using pyenv on these boxes:

  • ✅ Raspberry Pi 3B
  • ✅ Raspberry Pi 4

The operating systems I used were:

  • ✅ Raspberry Pi OS bookworm
  • ✅ Raspberry Pi OS trixie
  • ✅ DietPi

The steps were the same for all of them.

Okay, now, let us install Python 3.14.0.

Install pyenv

Assuming you have a properly working Raspberry Pi OS or equivalent, run apt update, followed by installation of the prerequisites.

sudo apt update
sudo apt install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

Next, install pyenv.

$ curl https://pyenv.run | bash

After that, set the environment variables for PYENV_ROOT and create a virtual environment.

export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - bash)"
eval "$(pyenv virtualenv-init -)"

Add these 4 lines to the bottom to your ~/.bashrc so that they'll run when you open a new Terminal session.

export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - bash)"
eval "$(pyenv virtualenv-init -)"

Install Python 3.14.0 using pyenv

Now, install Python 3.14.0. Run this:

$ pyenv install 3.14

This can take up to an hour, so you can go for a walk or watch a movie while it is running.

My screenshot while installation is in progress:

pi@DietPi:/tmp$ pyenv install 3.14
Downloading Python-3.14.0.tar.xz...
-> https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tar.xz
Installing Python-3.14.0...

After a successful installation of Python, set 14.0 as the default version globally:

pyenv global 3.14.0

Also, set it in the current shell session.

pyenv shell 3.14.0

Verify that Python 3.14.0 is installed and the default version

python -V

You will get the output as:

Python 3.14.0

If you want to confirm the Python build on the Python shell, run python on the terminal and press return or ENTER:

$ python 
Python 3.14.0 (main, Oct 15 2025, 13:25:57) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

If you want Python 3.13.7 instead of Python 3.14.0 using pyenv

If you want to install the latest Python 3.13 version, Python 3.13.7, instead of the latest and greatest Python 3.14.0, then follow these steps:

pyenv install 3.13.7

This process will also take up to an hour, so do whatever you like in the meantime.

After installation, if you want Python 3.13.7 to be the default version in your Raspberry Pi, run this:

pyenv global 3.13.7

To set Python 3.13.7 as the Python version in the current session:

pyenv shell 3.13.7

Conclusion

Python 3.14.0 is now installed in your Raspberry Pi. This blog post will work for any Debian-based flavor.

If you liked this post, please feel free to share it. If you have any problems installing Python 3.14 on your Raspberry Pi, feel free to contact me.

Related Posts

If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.

Disclaimer: Our website is supported by our users. We sometimes earn affiliate links when you click through the affiliate links on our website.

Last Updated: October 15, 2025.     This post was originally written on October 15, 2025.