Security
Apr 10, 2026

Migrating from Python 3.10 to 3.14

A practical guide to migrating from Python 3.10 to 3.14 before the 2026 end-of-life deadline

Give me the TL;DR
Migrating from Python 3.10 to 3.14
For Qualys admins, NES for .NET directly resolves the EOL/Obsolete Software:   Microsoft .NET Version 6 Detected vulnerability, ensuring your systems remain secure and compliant. Fill out the form to get pricing details and learn more.

We’re all familiar with the Python end-of-life (EOL) cycle. Each version is supported for about 5 years, and once that window closes, you’re left with a decision: upgrade or accept increasing risk.

Python 3.10 reaches EOL in October 2026. That might feel far away, but if you’re planning a jump to Python 3.14, this isn’t a quick version bump. It’s a meaningful migration. Unlike smaller upgrades, jumping from 3.10 to 3.14 introduces:

  • Changes to type annotations and runtime behavior
  • New deprecations that may already affect your dependencies, like changes to argparse, asyncio, and codecs

That means you need a deliberate, staged approach. The good news is that if you follow the right process by installing side-by-side, using isolated environments, and testing thoroughly, you can upgrade safely without breaking your system.

Let’s walk through it.

Get Set Up

Maybe you want to make this big jump because you finally have time to do it the right way and it will give you much longer to not worry about this. You might want to make your system compatible with later Python versions so you can use the latest versions of specific packages. Upgrading from 3.10 to 3.14 can be the trickiest option to move to a security-supported version of the Python language.

Before touching anything, you want to capture your current working state.

Export Your Dependencies:

Activate your existing Python 3.10 environment (if you have one), then run:

python -m pip freeze > requirements.txt

This gives you a reproducible snapshot of your project’s dependencies.

Make a Quick Sanity Check Script:

# python_test.py
import sys
import platform

print("Python version:", sys.version)
print("Executable:", sys.executable)
print("Platform:", platform.platform())

You’ll use this later to confirm you’re actually running Python 3.14.

Migration Strategy (Important):

Do not upgrade your system Python directly.

Instead:

  1. Install Python 3.14 alongside 3.10
  2. Create a new virtual environment
  3. Reinstall dependencies
  4. Fix compatibility issues
  5. Update CI/CD and deployment configs

If your dependency stack is old, consider stepping through an intermediate version (like 3.11 or 3.12) first, but that will make the migration take longer.

Linux: Python 3.10 → 3.14

On Linux, Python is often tied to system tools. Replacing it can break your OS. Use a version manager or install side-by-side.

Option A (recommended): use uv

Install uv

curl -LsSf https://astral.sh/uv/install.sh | sh

Restart your shell:

uv --version

Install Python 3.14:

uv python install 3.14
uv python list

Create a New Virtual Environment:

uv venv --python 3.14 .venv
source .venv/bin/activate
python --version

Install Dependencies:

python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt

Test Everything:

python python_test.py
pytest

Option B: use pyenv

Install pyenv:

curl -fsSL https://pyenv.run | bash

Restart your shell and initialize pyenv.

Install Python 3.14:

pyenv install 3.14.3
pyenv local 3.14.3
python --version

Create a Virtual Environment:

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt

Option C: Build from Source

It’s not the highest recommended option, but if for some reason you need full control:

sudo apt update
sudo apt install -y build-essential libssl-dev zlib1g-dev \
libncurses5-dev libreadline-dev libffi-dev libsqlite3-dev wget

cd /tmp
wget https://www.python.org/ftp/python/3.14.3/Python-3.14.3.tgz
tar -xzf Python-3.14.3.tgz
cd Python-3.14.3

./configure --enable-optimizations
make -j"$(nproc)"
sudo make altinstall

Then:

python3.14 -m venv .venv
source .venv/bin/activate

macOS: Python 3.10 → 3.14

macOS gives you a bit more flexibility, but the same rule applies: don’t overwrite your system Python.

Option A (recommended): Official Installer

Install Python 3.14

Download and run the macOS installer from python.org.

Verify:

python3.14 --version

Create a New Environment:

python3.14 -m venv .venv
source .venv/bin/activate
python --version

Install Dependencies:

python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt

Option B: Use uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

uv python install 3.14
uv venv --python 3.14 .venv

source .venv/bin/activate
python -m pip install -r requirements.txt

Option C: Use pyenv:

brew install pyenv
pyenv install 3.14.3
pyenv local 3.14.3

python -m venv .venv
source .venv/bin/activate

Windows: Python 3.10 → 3.14

Windows is simpler in a way. Python isn’t tied to the OS the same way as Linux or even macOS.

Install Python 3.14

Download the installer from python.org.

During install:

  • Check “Add python.exe to PATH”

Verify Installation:

py -3.14 --version
py -0p

Export Dependencies:

py -3.10 -m pip freeze > requirements.txt

Create a New Virtual Environment:

py -3.14 -m venv .venv
.\.venv\Scripts\activate
python --version

If Activation Fails:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Install Dependencies:

python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt

Test your App:

python python_test.py
pytest

Make Necessary Code Updates

Python 3.14 is mostly backward compatible, but not entirely.

Here are a few things to watch for:

  • Annotation behavior changes
    • If your code inspects annotations at runtime, it may behave differently.
  • Deprecated APIs
    • Some asyncio, argparse, and codecs behaviors have changed or been removed.

This is the part that usually takes the longest. Sometimes you won’t know things are broken until you’re already running the code and it’s being used. Take your time and go through your packages to see if any of them need to be upgraded to support this new Python version.

Test Everything

After upgrading:

  • Run your full test suites
  • Check your logs carefully
  • Watch for any warnings because they usually point to something that will break in the future

Use your staging environment to test if you have one.

Potential Issues

“I’m still on Python 3.10”

You probably have:

  • An old .venv activated
  • A shell pointing to the wrong interpreter

Try deleting and recreating the environment here.

Dependencies Fail to Install

This is common when jumping multiple versions.

Fix strategy:

  1. Upgrade the package
  2. Replace it
  3. Remove it, if possible

Wrong Python Version on Windows

Always use:

py -3.14

Instead of python if there’s any ambiguity.

Taking Action

This isn’t just a version bump, it’s a migration.

If your project is large or has legacy dependencies, give yourself time. A clean upgrade path looks like:

  • Isolated environment
  • Rebuilt dependencies
  • Full test coverage
  • Gradual rollout

If you’re not ready to make the jump yet, you still have time before Python 3.10 reaches EOL. But the earlier you start validating your upgrade path, the smoother it will be when you need it.

HeroDevs will offer never-ending support for Python 3.10, so you can keep continuity in security for your Python projects without needing to upgrade. It’s the exact same as what you currently have installed, it will just keep you secure in the event of any CVEs that could compromise your system.

Table of Contents
Author
Milecia McGregor
SR Software Engineer
Open Source Insights Delivered Monthly