piwheels / packages

Issue tracker for piwheels package issues
https://github.com/piwheels/packages/issues
20 stars 5 forks source link

Missing package: `pydantic-core` versions 2.8.0+ #393

Closed jannis-baum closed 11 months ago

jannis-baum commented 1 year ago

Package name

pydantic-core

Package version

2.8.0, 2.9.0, 2.10.0, 2.10.1

PyPI URL

https://pypi.org/project/pydantic-core/

piwheels URL

https://www.piwheels.org/project/pydantic-core/

Python version

I am the maintainer

More information

Hello! I'm failing to install supabase because the required version 2.10.1 of pydantic-core seems to be missing. If I'm reading the JSON correctly, it looks like the most recent available version was 2.7; all newer ones don't have any files listed.

bennuttall commented 1 year ago

We haven't been building any new releases for the last 10 days or so, as we're currently building the backlog for Python 3.11.

We're nearly done now so normal service will be resumed in the next couple of days, and we'll begin catching up on new releases for Python 3.7 and 3.9.

jannis-baum commented 1 year ago

Thanks for the quick reply! In the meantime, I'm now trying to install pydantic-core version 2.7.0, the latest version that is available as a wheel.

sudo pip3 install pydantic-core==2.7.0 --only-binary=:all: --index-url https://www.piwheels.org/simple

However, pip seems to think there is no wheel for this version:

ERROR: Could not find a version that satisfies the requirement pydantic-core==2.7
ERROR: No matching distribution found for pydantic-core==2.7

Am I doing something wrong on my side? Any help is greatly appreciated!

bennuttall commented 1 year ago

2.7.0 is available as a wheel but only for cp311: https://piwheels.org/simple/pydantic-core/

Try removing the version requirement, and it'll give you the latest available version.

bennuttall commented 1 year ago

It looks like this package never successfully built for 3.9, so that's no good. We only recently added a newer rust to the builders and rebuilt certain packages we knew it was needed for. I'll make sure it gets rebuilt when we bring back cp39 builders.

bennuttall commented 1 year ago

For now, if you install rust with rustup, pip install should work.

jannis-baum commented 1 year ago

It unfortunately doesn't; I have installed rust (rustc --version, cargo --version work & my PATH is exported), but for whatever reason pip can't find it when trying to build the wheel.

bennuttall commented 1 year ago

Try running this line as root: https://github.com/piwheels/piwheels/blob/master/deploy_slave.sh#L73 (but with your own username eg pi instead of piwheels) and adding ~/.cargo/bin to your PATH

jannis-baum commented 1 year ago

I uninstalled rust and reinstalled using the line you suggested but it's still the same. I run

sudo pip3 install pydantic-core

and get

Collecting pydantic-core
  Using cached pydantic_core-2.10.1.tar.gz (347 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 /tmp/tmpopahlze7_in_process.py prepare_metadata_for_build_wheel /tmp/tmpk6atihg7
         cwd: /tmp/pip-install-i79ceoqf/pydantic-core_34def58aa04e456b86e7dbe377442ce2
    Complete output (6 lines):

    Cargo, the Rust package manager, is not installed or is not on PATH.
    This package requires Rust and Cargo to compile extensions. Install it through
    the system's package manager or via https://rustup.rs/

    Checking for Rust toolchain....
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/af/31/8e466c6ed47cddf23013d2f2ccf3fdb5b908ffa1d5c444150c41690d6eca/pydantic_core-2.10.1.tar.gz#sha256=0f8682dbdd2f67f8e1edddcbffcc29f60a6182b4901c367fc8c1c40d30bb0a82 (from https://pypi.org/simple/pydantic-core/) (requires-python:>=3.7). Command errored out with exit status 1: /usr/bin/python3 /tmp/tmpopahlze7_in_process.py prepare_metadata_for_build_wheel /tmp/tmpk6atihg7 Check the logs for full command output.

which then loops a few times before giving up. The logs don't show any additional information as far as I can tell. My PATH is exported and has /home/.../.cargo/bin/ and explicitly setting it for the pip command also doesn't change anything. Could it be that someone hardcoded Cargo's path to somewhere else? Do you have an idea how to check this? Or maybe something completely different?

I'm using an armv6l Pi Zero W by the way with pip 23.2.1 & Python 3.9.2 in case that matters.

Thanks a lot for taking the time to look into the issue, it's very much appreciated!

bennuttall commented 1 year ago

@michaing any ideas?

MichaIng commented 1 year ago

Because the latest versions have not yet been built: https://piwheels.org/project/pydantic-core/ I guess Bookworm/Python 3.11 builds are still blocking regular module updates? https://github.com/piwheels/packages/issues/388 @bennuttall is an estimation possible how long there still take? I am e.g. also waiting for a latest Pillow wheel 🙂.

bennuttall commented 1 year ago

We're approaching the end of the cp311 build queue and then I'll bring back some cp37 and cp39 builders, probably in the next couple of days.

I wondered if you knew why @jannis-baum's local builds were failing

MichaIng commented 1 year ago

Ah, is it probably the same issue we had with the piwheels build RPis, with 64-bit kernel and 32-bit userland?

If this is the case, i.e. uname -m reporting aarch64 but dpkg --print-architecture reporting armhf, then try to set the default host for Rust to armv7 explicitly. I think this can be somehow done via the installed rustup binary as well, but I'd need to check the docs. With the installer it can be done like this:

curl -sSf 'https://sh.rustup.rs/' | bash -s -- -y --profile minimal --default-host 'armv7-unknown-linux-gnueabihf'
jannis-baum commented 1 year ago

Sorry for the late reply. I get armv6l von uname -m and armhf on dpkg --print-architecture. Tried reinstalling Rust as you suggested but it doesn't seem to work on my armv6l Pi Zero W (Illegal instruction).

Anyways, thanks a lot for your support!! Since I needed a solution somewhat urgently, I ended up going for a different architecture where I don't need the supabase package. So from my side this issue is no longer relevant, feel free to close or leave open however you need it :) Thanks!

MichaIng commented 1 year ago

Ah okay, the 64-bit kernel + 32-bit OS/userland happens on RPi 4 only.

On ARMv6, the "armv7" default host of course cannot work. It would then be:

curl -sSf 'https://sh.rustup.rs/' | bash -s -- -y --profile minimal --default-host 'arm-unknown-linux-gnueabihf'

But this surely was implicitly the case on your first rustup install, so I guess you'll end up with the previous issue. But as compiling from source (user end) is outside of the responsibility/scope of piwheels, and you bypassed the issue otherwise, let's close it.

But just for the record, piwheel is catching up with pre-compiled wheels: pydantic-core v2.10.0 (the second latest version) is available already for Python 3.11, so it shouldn't take too long until wheels are there, also for Python 3.9 and 3.7.