Closed holta closed 1 year ago
@michaing any ideas?
Are you sure that you added piwheels as extra index? I see only the architecture independent "any" wheels being downloaded (and pip
does not show whether from piwheels or PyPI), while all architecture dependent modules are downloaded as source archives and tried to be compiled in place. This of course fails if no development headers are installed, but is unrelated to piwheels.
If piwheels indeed has been added as index and other wheels are indeed downloaded form piwheels (which we cannot see here), then we'd need to check why cffi, cryptography and PyYAML are not.
@MichaIng @bennuttall thanks for your help.
Just LMK if any additional testing results are needed. 💯
As said, currently it looks like you did not add piwheels as additional index. Please check your pip.conf
and in case show some pip
output where wheels are really downloaded from piwheels. Otherwise I see no issue.
Ugh sorry @MichaIng didn't read the output properly
1) Any idea why /etc/pip.conf
exists on 64-bit Raspberry Pi OS but not on 32-bit Raspberry Pi OS? Directly in opposition to what is claimed at the top of the main page https://piwheels.org here:
2) Great news is that adding the above file ( /etc/pip.conf
) to "32-bit" (running a 64-bit kernel) Raspberry Pi OS 12 / Bookworm pre-release is indeed confirmed to work, even/also in the venv. Thank you @MichaIng for explaining!
AFAIK, pip,conf
is not present on any vanilla Raspberry Pi OS but always needs to be added manually. And yes, on the 64-bit variant it does not make any sense of course as piwheels does not currently support 64-bit.
EDIT: Ah, I just see the note that it is assumed to be present now. I wasn't aware of this, but makes sense (on the 32-bit variant). Strange is that I cannot see this being done neither in pi-gen
, not as part of the raspberrypi-sys-mods
package 🤔.
Actually /etc/pip.conf
is added by the python-pip-whl
package in pios. I'm not sure if it's included in aarch64 images, or in bookworm. Will make sure RPTL are aware it should be there. Even if we don't have aarch64 wheels yet, it does no harm and prepares for future support.
Ah I see: https://archive.raspberrypi.org/debian/pool/main/p/python-pip/
I thought that it might be overwritten by a newer version on Bookworm, but actually that package does not exist on Debian Bookworm at all: https://packages.debian.org/python-pip-whl Instead: https://packages.debian.org/python3-pip-whl
Now I see that python-pip-whl
was a dependency of python-pip
as well as python3-pip
until Bullseye. On RPi OS lite this is not pre-installed, so if you do not install it manually, or instead install pip
via get-pip.py
, you won't have this package. Since Bookworm however, python-pip-whl
has been removed (along with all Python 2 packages) and python3-pip-whl
has not been added as dependency. So on a distro upgrade Bullseye => Bookworm python-pip-whl
gets auto-removed and python3-pip-whl
not installed. As RPi provides the python3-pip
package from their repo, along with the adjusted python-pip-whl
package, they'd need to add python3-pip-whl
and add is as dependency to python3-pip
for Bookworm builds of these packages to maintain the current behaviour.
Ah that makes sense. I'll let them know.
python3-pip-whl has not been added as dependency. So on a distro upgrade Bullseye => Bookworm python-pip-whl gets auto-removed and python3-pip-whl not installed.
In Addition:
apt package python3-pip-whl
was in fact installed — as a result of my manually running apt install python3-venv
(as seen in original above readout).
Consequently RasPiOS may want to consider altering apt package python3-pip-whl
— so that it too installs /etc/pip.conf
:pray:
root@raspberrypi:~# apt install python3-venv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
python3-distutils python3-lib2to3 python3-pip-whl python3-setuptools-whl python3.11-venv
The following NEW packages will be installed:
python3-distutils python3-lib2to3 python3-pip-whl python3-setuptools-whl python3-venv python3.11-venv
...
Reading the package description, the whole purpose of it is to be able to run pip
within venv
, so it totally makes sense to have it as dependency of python3-venv
instead of python3-pip
: https://packages.debian.org/bookworm/python3-pip-whl
Now that Debian ships the /usr/lib/python3.11/EXTERNALLY-MANAGED
blocker, pip
is generally seen to be used within venv
only. And while pip
is also often installed via https://bootstrap.pypa.io/get-pip.py, Python itself and venv
are installed via Debian APT packages in most cases. So it is probably best to add pip.conf
in python3-pip-whl
and leave it as python3-venv
dependency, so that it is automatically installed in the most common/intended cases.
Package name
cryptography & cffi
Package version
41.0.3 & 1.15.1
PyPI URL
https://pypi.org/project/cryptography/ & https://pypi.org/project/cffi/
piwheels URL
https://www.piwheels.org/project/cryptography/ & https://www.piwheels.org/project/cffi/
Python version
I am the maintainer
More information
Just FYI cffi (C Foreign Function Interface) failure occurs even with the new Python 3.11 wheels (thank you!!) that were just recently posted here:
https://www.piwheels.org/simple/cryptography/
https://www.piwheels.org/simple/cffi/
Error is pasted in below in the hopes that this helps us & all move the ball forward as Raspberry Pi OS "Bookworm" converges soon. :pray:
FYI the error occurs regardless whether running with a 32-bit kernel or 64-bit kernel — on a fresh "officially 32-bit" RasPiOS 12 Lite (Bookworm, Python 3.11) as apt updated from https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf-lite.img.xz — i.e. regardless whether or not Raspberry Pi OS's newer override
arm_64bit=0
is set in/boot/config.txt
(raspberrypi/firmware#1795) to force the running of a true 32-bit kernel.OS/Architecture/Prep Details
``` root@raspberrypi:~# cat /etc/issue Raspbian GNU/Linux 12 \n \l root@raspberrypi:~# cat /etc/rpi-issue Raspberry Pi reference 2023-05-03 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 47eee1f0ddcf8811559d51eea1c1bb48335e3e88, stage2 root@raspberrypi:~# grep -r bookworm /etc/apt /etc/apt/sources.list.d/raspi.list:deb http://archive.raspberrypi.org/debian/ bookworm main /etc/apt/sources.list.d/raspi.list:#deb-src http://archive.raspberrypi.org/debian/ bookworm main /etc/apt/sources.list:deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi /etc/apt/sources.list:#deb-src http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi root@raspberrypi:~# uname -a Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux root@raspberrypi:~# tail -1 /proc/cpuinfo Model : Raspberry Pi 4 Model B Rev 1.1 root@raspberrypi:~# apt install python3-venv Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: python3-distutils python3-lib2to3 python3-pip-whl python3-setuptools-whl python3.11-venv The following NEW packages will be installed: python3-distutils python3-lib2to3 python3-pip-whl python3-setuptools-whl python3-venv python3.11-venv 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. Need to get 3,043 kB of archives. After this operation, 4,197 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://raspbian.mirror.constant.com/raspbian bookworm/main armhf python3-lib2to3 all 3.11.2-3 [76.3 kB] Get:2 http://raspbian.mirror.constant.com/raspbian bookworm/main armhf python3-distutils all 3.11.2-3 [131 kB] Get:3 http://raspbian.raspberrypi.org/raspbian bookworm/main armhf python3-pip-whl all 23.0.1+dfsg-1 [1,717 kB] Get:4 http://raspbian.mirror.constant.com/raspbian bookworm/main armhf python3-setuptools-whl all 66.1.1-1 [1,111 kB] Get:6 http://raspbian.raspberrypi.org/raspbian bookworm/main armhf python3-venv armhf 3.11.2-1 [1,188 B] Get:5 http://raspbian.mirror.constant.com/raspbian bookworm/main armhf python3.11-venv armhf 3.11.2-6 [5,892 B] Fetched 3,043 kB in 2s (1,409 kB/s) Selecting previously unselected package python3-lib2to3. (Reading database ... 44873 files and directories currently installed.) Preparing to unpack .../0-python3-lib2to3_3.11.2-3_all.deb ... Unpacking python3-lib2to3 (3.11.2-3) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../1-python3-distutils_3.11.2-3_all.deb ... Unpacking python3-distutils (3.11.2-3) ... Selecting previously unselected package python3-pip-whl. Preparing to unpack .../2-python3-pip-whl_23.0.1+dfsg-1_all.deb ... Unpacking python3-pip-whl (23.0.1+dfsg-1) ... Selecting previously unselected package python3-setuptools-whl. Preparing to unpack .../3-python3-setuptools-whl_66.1.1-1_all.deb ... Unpacking python3-setuptools-whl (66.1.1-1) ... Selecting previously unselected package python3.11-venv. Preparing to unpack .../4-python3.11-venv_3.11.2-6_armhf.deb ... Unpacking python3.11-venv (3.11.2-6) ... Selecting previously unselected package python3-venv. Preparing to unpack .../5-python3-venv_3.11.2-1_armhf.deb ... Unpacking python3-venv (3.11.2-1) ... Setting up python3-setuptools-whl (66.1.1-1) ... Setting up python3-pip-whl (23.0.1+dfsg-1) ... Setting up python3-lib2to3 (3.11.2-3) ... Setting up python3-distutils (3.11.2-3) ... Setting up python3.11-venv (3.11.2-6) ... Setting up python3-venv (3.11.2-1) ... root@raspberrypi:~# python3 -m venv /usr/local/ansible ```Related: