Ubuntu/Python/3.14: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 1: | Line 1: | ||
== Install with DeadSnakes PPA == | |||
Dependency: | Dependency: | ||
sudo apt install software-properties-common | sudo apt install software-properties-common | ||
Latest revision as of 08:15, 6 April 2026
Install with DeadSnakes PPA
Dependency:
sudo apt install software-properties-common
Add Deadsnakes and install python 3.14
sudo add-apt-repository ppa:deadsnakes/ppa # respond to prompts sudo apt update sudo apt install python3.14 # should also install: sudo apt install python3.14-dev python3.14-venv
python3.14 --version
For development, virtuan env
sudo apt install python3.14-dev python3.14-venv
For a more complete installation including the Tkinter IDE and other utilities, you can use:
sudo apt install python3.14-full
Pip:
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.14
python3.14 -m pip install pip --upgrade
python3.14 -m pip --version
python3.14 -m pip list
venv: (requires pip)
python3.14 -m venv -h
# check if pip is working python3.14 -m ensurepip # /usr/bin/python3.14: No module named ensurepip # if this fails with the above, install pip and python3.14-venv ^
cd ~ ; rm -rf .test-venv ; mkdir .test-venv ; cd .test-venv ; python3.14 -m venv venv
pip3.14 script
Dead-Snakes doesn't install the pip3.14 script for reason. Can manually install, by copying the python 3.12 version, and changing the shebang header from python3 to python3.14
cd /usr/bin cp pip3.12 pip3.14 sed -i "s/python3/python3.14/" pip3.14
/usr/bin/pip3.14
#!/usr/bin/python3.14
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == "__main__":
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
sys.exit(main())
Alternatively, you could also just create an alias:
alias pip3.14="python3.14 -m pip"