Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64 linux issue? #7230

Closed
1 task done
aviramha opened this issue Aug 23, 2023 · 1 comment
Closed
1 task done

aarch64 linux issue? #7230

aviramha opened this issue Aug 23, 2023 · 1 comment
Assignees

Comments

@aviramha
Copy link
Contributor

aviramha commented Aug 23, 2023

Initial Checks

  • I confirm that I'm using Pydantic V2

Description

I have a Dockerfile which fails to build on aarch64 - I assume it's because usually people install the wheels and maybe there aren't wheels?

Error:

8.363 Collecting pydantic-core==2.6.1 (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi)
9.365   Downloading https://files.pythonhosted.org/packages/d9/5f/3db8f8cd1234ef6c3c3aeb8c3f7e3a9da62ebf178dd59d19d991d30cc987/pydantic_core-2.6.1.tar.gz (334kB)
9.528   Installing build dependencies: started
72.24   Installing build dependencies: still running...
72.67   Installing build dependencies: finished with status 'done'
72.79     Complete output from command python setup.py egg_info:
72.79     Traceback (most recent call last):
72.79       File "<string>", line 1, in <module>
72.79       File "/usr/lib/python3.7/tokenize.py", line 447, in open
72.79         buffer = _builtin_open(filename, 'rb')
72.79     FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-10tlxihj/pydantic-core/setup.py'

Example Code

FROM buildpack-deps:buster
RUN apt-get update && apt-get install -y protobuf-compiler gcc-x86-64-linux-gnu curl bison npm python3-pip
RUN pip3 install flask fastapi uvicorn "httptools>=0.5.0" "uvloop>=0.14.0,!=0.15.0,!=0.15.1"


### Python, Pydantic & OS Version

```Text
aarch64 (arm m1 Linux docker) 
pydantic 2.6.1
Python 3.7

Selected Assignee: @lig

@aviramha aviramha added bug V2 Bug related to Pydantic V2 unconfirmed Bug not yet confirmed as valid/applicable labels Aug 23, 2023
@davidhewitt
Copy link
Contributor

We do ship wheels for arm and x86 for all of Windows, macOS and Linux. See https://pypi.org/project/pydantic-core/#files

The problem is your build isn't picking them up:

  • Debian buster is seriously aging at this point; security updates have ended and LTS ends next year. Switching to FROM buildpack-deps:bullseye fixes the install if you are prepared to update your OS. (buildpack-deps:bookworm or even buildpack-deps:stable also work if you want to use latest stable Debian version.)

  • The root cause is that pip3 on buster is an antiquated pip version, 18.1. Our wheels are built for manylinux2014 (now known as manylinux_2_17) - support for that didn't come until pip 19.3.

    If you must use buster, you can first update the pip version and then the wheels should download fine, as it's python 3.7 and glibc 2.28, which we do currently support.

    Note that we are considering dropping 3.7 support soon in Drop Python3.7 support #7188 - another reason to consider upgrading from buster.

I haven't attempted to debug the exact error message in your OP, it's probably related to the old pip version not supporting PEP517 (that came in pip 19.0) .

@davidhewitt davidhewitt removed unconfirmed Bug not yet confirmed as valid/applicable bug V2 Bug related to Pydantic V2 labels Aug 24, 2023
@lig lig closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants