apt-cache policy python3
sudo add-apt-repository ppa:deadsnakes/ppa
https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
MAKE SURE your Linux version is supported: https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/dists/
IF NOT, use latest supported version for ppa
sudo nano /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-jammy.list
deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ focal main
deb-src https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ focal main
sudo apt edit-sources // edit repositories
sudo nano /etc/apt/sources.list // edit repositories
ls /etc/apt/sources.list.d // list additional repositories files
/etc/apt/sources.list.d$ sudo dpkg --force-depends --purge libpython3.10-stdlib
dpkg: libpython3.10-stdlib:amd64: dependency problems, but removing anyway as you requested:
python3.10 depends on libpython3.10-stdlib (= 3.10.7-1ubuntu0.4).
(Reading database ... 254967 files and directories currently installed.)
Removing libpython3.10-stdlib:amd64 (3.10.7-1ubuntu0.4) ...
/etc/apt/sources.list.d$ sudo dpkg --force-depends --purge libpython3.10
dpkg: warning: ignoring request to remove libpython3.10 which isn't installed
/etc/apt/sources.list.d$ sudo dpkg --force-depends --purge libpython3.10-minimal
dpkg: libpython3.10-minimal:amd64: dependency problems, but removing anyway as you requested:
python3.10-minimal depends on libpython3.10-minimal (= 3.10.7-1ubuntu0.4).
(Reading database ... 254625 files and directories currently installed.)
Removing libpython3.10-minimal:amd64 (3.10.7-1ubuntu0.4) ...
Purging configuration files for libpython3.10-minimal:amd64 (3.10.7-1ubuntu0.4) ...
/etc/apt/sources.list.d$ sudo dpkg --force-depends --purge libpython3.10
dpkg: warning: ignoring request to remove libpython3.10 which isn't installed
/etc/apt/sources.list.d$ sudo apt install python3.10
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
python3.10 : Depends: python3.10-minimal (= 3.10.12-1+focal1) but 3.10.7-1ubuntu0.4 is to be installed
Depends: libpython3.10-stdlib (= 3.10.12-1+focal1) but it is not going to be installed
python3.10-minimal : Depends: libpython3.10-minimal (= 3.10.7-1ubuntu0.4) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
sudo apt purge python3.10
sudo aptitude
https://packages.ubuntu.com/kinetic/libpython3.10-stdlib
sudo dpkg -i libmpdec3_2.5.1-2build2_amd64.deb
sudo dpkg -i libpython3.10-minimal_3.10.7-1ubuntu0.4_amd64.deb
sudo dpkg -i libpython3.10-stdlib_3.10.7-1ubuntu0.4_amd64.deb
sudo apt --fix-broken install
Change the Python3 default version in Ubuntu
cd /usr/bin
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
sudo update-alternatives --config python // choose python version
python3 --version
Python 3.10.7
See Technical details about this PPA => Signing key: => Fingerprint:
https://askubuntu.com/questions/1459362/how-to-resolve-the-key-not-available-error-on-deadsnakes-ppa
https://www.rosehosting.com/blog/how-to-install-and-switch-python-versions-on-ubuntu-20-04/
https://unix.stackexchange.com/questions/410579/change-the-python3-default-version-in-ubuntu
No comments:
Post a Comment