Thanks so much for your very detailed response, I had little faith my problem would be even worth a response.
However I have run into an issue when updating my version of python, where dpkg returned an error:
Screenshot by Lightshot (not allowed to upload more than 1 piece of embedded media as a new user)
Assuming dpkg was broken, i tried to fix it only for it to return the same error code:
bash dump below
rui@Rui-AI-Desktop:~$ python3 -V
Python 3.8.10
rui@Rui-AI-Desktop:~$ sudo add-apt-repository ppa:deadsnakes/ppa
This PPA contains more recent Python versions packaged for Ubuntu.
Disclaimer: there's no guarantee of timely updates in case of security problems or other issues. If you want to use them in a security-or-otherwise-critical environment (say, on a production server), you do so at your own risk.
Update Note
===========
Please use this repository instead of ppa:fkrull/deadsnakes.
Reporting Issues
================
Issues can be reported in the master issue tracker at:
https://github.com/deadsnakes/issues/issues
Supported Ubuntu and Python Versions
====================================
- Ubuntu 22.04 (jammy) Python3.7 - Python3.9, Python3.11 - Python3.13
- Ubuntu 24.04 (noble) Python3.7 - Python3.11, Python3.13
- Note: Python 3.10 (jammy), Python3.12 (noble) are not provided by deadsnakes as upstream ubuntu provides those packages.
Why some packages aren't built:
- Note: for jammy and noble, older python versions requre libssl<3 so they are not currently built
- If you need these, reach out to asottile to set up a private ppa
The packages may also work on other versions of Ubuntu or Debian, but that is not tested or supported.
Packages
========
The packages provided here are loosely based on the debian upstream packages with some modifications to make them more usable as non-default pythons and on ubuntu. As such, the packages follow debian's patterns and often do not include a full python distribution with just `apt install python#.#`. Here is a list of packages that may be useful along with the default install:
- `python#.#-dev`: includes development headers for building C extensions
- `python#.#-venv`: provides the standard library `venv` module
- `python#.#-distutils`: provides the standard library `distutils` module
- `python#.#-lib2to3`: provides the `2to3-#.#` utility as well as the standard library `lib2to3` module
- `python#.#-gdbm`: provides the standard library `dbm.gnu` module
- `python#.#-tk`: provides the standard library `tkinter` module
Third-Party Python Modules
==========================
Python modules in the official Ubuntu repositories are packaged to work with the Python interpreters from the official repositories. Accordingly, they generally won't work with the Python interpreters from this PPA. As an exception, pure-Python modules for Python 3 will work, but any compiled extension modules won't.
To install 3rd-party Python modules, you should use the common Python packaging tools. For an introduction into the Python packaging ecosystem and its tools, refer to the Python Packaging User Guide:
https://packaging.python.org/installing/
Sources
=======
The package sources are available at:
https://github.com/deadsnakes/
Nightly Builds
==============
For nightly builds, see ppa:deadsnakes/nightly https://launchpad.net/~deadsnakes/+archive/ubuntu/nightly
More info: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Get:1 file:/var/cudnn-local-tegra-repo-ubuntu2004-8.6.0.166 InRelease [1,575 B]
Get:1 file:/var/cudnn-local-tegra-repo-ubuntu2004-8.6.0.166 InRelease [1,575 B]
Hit:2 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Hit:3 https://repo.download.nvidia.com/jetson/common r35.5 InRelease
Hit:4 https://repo.download.nvidia.com/jetson/t234 r35.5 InRelease
Get:5 https://pkgs.tailscale.com/stable/ubuntu focal InRelease
Hit:6 https://repo.download.nvidia.com/jetson/ffmpeg r35.5 InRelease
Hit:7 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:8 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:9 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:10 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Fetched 6,581 B in 2s (3,495 B/s)
Reading package lists... Done
rui@Rui-AI-Desktop:~$ sudo apt-get update
Get:1 file:/var/cudnn-local-tegra-repo-ubuntu2004-8.6.0.166 InRelease [1,575 B]
Get:1 file:/var/cudnn-local-tegra-repo-ubuntu2004-8.6.0.166 InRelease [1,575 B]
Hit:2 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:5 https://repo.download.nvidia.com/jetson/common r35.5 InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:7 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Hit:8 https://repo.download.nvidia.com/jetson/t234 r35.5 InRelease
Get:9 https://pkgs.tailscale.com/stable/ubuntu focal InRelease
Hit:10 https://repo.download.nvidia.com/jetson/ffmpeg r35.5 InRelease
Fetched 6,581 B in 1s (4,705 B/s)
Reading package lists... Done
rui@Rui-AI-Desktop:~$ apt list | grep python3.10
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libqgispython3.10.4/focal,now 3.10.4+dfsg-1ubuntu2 arm64 [installed]
rui@Rui-AI-Desktop:~$ sudo apt-get install python3.10
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note: selecting 'libqgispython3.10.4' for regex 'python3.10'
Note: selecting 'libpython3.10-stdlib' for regex 'python3.10'
libqgispython3.10.4 is already the newest version (3.10.4+dfsg-1ubuntu2).
The following packages were automatically installed and are no longer required:
apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common
libdebian-installer4 libpaps0 libtimezonemap-data libtimezonemap1 os-prober paps python3-icu python3-pam rdate tasksel
tasksel-data
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up nvidia-l4t-bootloader (35.5.0-20240613202628) ...
3701--0005--1--jetson-orin-nano-devkit-
Info. Installing mtdblock.
Info. Active boot storage: mmcblk1
Info. Legacy mode: false
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Info: Write TegraPlatformCompatSpec with 3701--0005--1--jetson-orin-nano-devkit-.
INFO. Dump slots info:
Current version: 35.4.1
Capsule update status: 0
Current bootloader slot: A
Active bootloader slot: A
num_slots: 2
slot: 0, status: normal
slot: 1, status: normal
INFO. Dump nv_boot_control.conf:
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
ERROR. 3701--0005--1--jetson-orin-nano-devkit- does not match any known boards.
dpkg: error processing package nvidia-l4t-bootloader (--configure):
installed nvidia-l4t-bootloader package post-installation script subprocess returned error exit status 1
Setting up nvidia-l4t-kernel (5.10.192-tegra-35.5.0-20240613202628) ...
Using the existing boot entry 'primary'
3701--0005--1--jetson-orin-nano-devkit-
Info. Installing mtdblock.
Info. Active boot storage: mmcblk1
Info. Legacy mode: false
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Info: Write TegraPlatformCompatSpec with 3701--0005--1--jetson-orin-nano-devkit-.
Starting kernel post-install procedure.
Rootfs AB is not enabled.
ERROR. Procedure for A_kernel update FAILED.
Cannot install package. Exiting...
dpkg: error processing package nvidia-l4t-kernel (--configure):
installed nvidia-l4t-kernel package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-headers:
nvidia-l4t-kernel-headers depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-kernel-headers (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-display-kernel:
nvidia-l4t-display-kernel depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-display-kernel (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-dtbs:
nvidia-l4t-kernel-dtbs depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-kernel-dtbs (--configure):
No apport report written because the error message indicates it's a follow-up error from a previous failure.
No apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached
dependency problems - leaving unconfigured
Errors were encountered while processing:
nvidia-l4t-bootloader
nvidia-l4t-kernel
nvidia-l4t-kernel-headers
nvidia-l4t-display-kernel
nvidia-l4t-kernel-dtbs
E: Sub-process /usr/bin/dpkg returned an error code (1)
rui@Rui-AI-Desktop:~$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
rui@Rui-AI-Desktop:~$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
update-alternatives: error: alternative path /usr/bin/python3.10 doesn't exist
rui@Rui-AI-Desktop:~$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
update-alternatives: error: alternative path /usr/bin/python3.10 doesn't exist
rui@Rui-AI-Desktop:~$ sudo dpkg --configure -a
Setting up nvidia-l4t-bootloader (35.5.0-20240613202628) ...
3701--0005--1--jetson-orin-nano-devkit-
Info. Installing mtdblock.
Info. Active boot storage: mmcblk1
Info. Legacy mode: false
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Info: Write TegraPlatformCompatSpec with 3701--0005--1--jetson-orin-nano-devkit-.
INFO. Dump slots info:
Current version: 35.4.1
Capsule update status: 0
Current bootloader slot: A
Active bootloader slot: A
num_slots: 2
slot: 0, status: normal
slot: 1, status: normal
INFO. Dump nv_boot_control.conf:
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
ERROR. 3701--0005--1--jetson-orin-nano-devkit- does not match any known boards.
dpkg: error processing package nvidia-l4t-bootloader (--configure):
installed nvidia-l4t-bootloader package post-installation script subprocess returned error exit status 1
Setting up nvidia-l4t-kernel (5.10.192-tegra-35.5.0-20240613202628) ...
Using the existing boot entry 'primary'
3701--0005--1--jetson-orin-nano-devkit-
Info. Installing mtdblock.
Info. Active boot storage: mmcblk1
Info. Legacy mode: false
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Info: Write TegraPlatformCompatSpec with 3701--0005--1--jetson-orin-nano-devkit-.
Starting kernel post-install procedure.
Rootfs AB is not enabled.
ERROR. Procedure for A_kernel update FAILED.
Cannot install package. Exiting...
dpkg: error processing package nvidia-l4t-kernel (--configure):
installed nvidia-l4t-kernel package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-headers:
nvidia-l4t-kernel-headers depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-kernel-headers (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-display-kernel:
nvidia-l4t-display-kernel depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-display-kernel (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-dtbs:
nvidia-l4t-kernel-dtbs depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-kernel-dtbs (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
nvidia-l4t-bootloader
nvidia-l4t-kernel
nvidia-l4t-kernel-headers
nvidia-l4t-display-kernel
nvidia-l4t-kernel-dtbs
rui@Rui-AI-Desktop:~$ sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common
libdebian-installer4 libpaps0 libtimezonemap-data libtimezonemap1 os-prober paps python3-icu python3-pam rdate tasksel
tasksel-data
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nvidia-l4t-bootloader (35.5.0-20240613202628) ...
3701--0005--1--jetson-orin-nano-devkit-
Info. Installing mtdblock.
Info. Active boot storage: mmcblk1
Info. Legacy mode: false
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Info: Write TegraPlatformCompatSpec with 3701--0005--1--jetson-orin-nano-devkit-.
INFO. Dump slots info:
Current version: 35.4.1
Capsule update status: 0
Current bootloader slot: A
Active bootloader slot: A
num_slots: 2
slot: 0, status: normal
slot: 1, status: normal
INFO. Dump nv_boot_control.conf:
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
ERROR. 3701--0005--1--jetson-orin-nano-devkit- does not match any known boards.
dpkg: error processing package nvidia-l4t-bootloader (--configure):
installed nvidia-l4t-bootloader package post-installation script subprocess returned error exit status 1
Setting up nvidia-l4t-kernel (5.10.192-tegra-35.5.0-20240613202628) ...
Using the existing boot entry 'primary'
3701--0005--1--jetson-orin-nano-devkit-
Info. Installing mtdblock.
Info. Active boot storage: mmcblk1
Info. Legacy mode: false
TNSPEC 3701-501-0005-G.0-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3701--0005--1--jetson-orin-nano-devkit-
TEGRA_LEGACY_UPDATE false
TEGRA_BOOT_STORAGE mmcblk1
TEGRA_EMMC_ONLY false
TEGRA_CHIPID 0x23
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
Info: Write TegraPlatformCompatSpec with 3701--0005--1--jetson-orin-nano-devkit-.
Starting kernel post-install procedure.
Rootfs AB is not enabled.
ERROR. Procedure for A_kernel update FAILED.
Cannot install package. Exiting...
dpkg: error processing package nvidia-l4t-kernel (--configure):
installed nvidia-l4t-kernel package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-headers:
nvidia-l4t-kernel-headers depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-kernel-headers (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-display-kernel:
nvidia-l4t-display-kernel depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-display-kernel (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-kernel-dtbs:
nvidia-l4t-kernel-dtbs depends on nvidia-l4t-kernel (= 5.10.192-tegra-35.5.0-20240613202628); however:
Package nvidia-l4t-kernel is not configured yet.
dpkg: error processing package nvidia-l4t-kernel-dtbs (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
No apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
nvidia-l4t-bootloader
nvidia-l4t-kernel
nvidia-l4t-kernel-headers
nvidia-l4t-display-kernel
nvidia-l4t-kernel-dtbs
E: Sub-process /usr/bin/dpkg returned an error code (1)
rui@Rui-AI-Desktop:~$
I figure id rather update python now to prevent future problems rather than downgrade my huggingface_hub install.
Thanks again
Edit: for some reason when tinkering with newer python versions than 3.10 or 3.11, I have managed to update to python 3.9.5 (?) and followed the rest of your instructions successfully, so thank you.
But if you know a good fix and its not too much to ask id still be happy to know how to fix this problem to prevent more in the future.
