Pip install is failing to build due to av/logging.pyx error #1762
Replies: 26 comments
-
I get the same issue on x86_64 ubuntu 23.04, and in a docker container based on python:3.11-slim (which is based on debian:bookworm-slim). I can't use a binary wheel because the bundled ffmpeg is compiled without Pulseaudio support, which I need. |
Beta Was this translation helpful? Give feedback.
-
Same here. I'm wondering if this is due to the release of Cython 3.0.0 - my failing CI shows it's being picked up as part of the PyAV build, and it worked yesterday morning 😄 |
Beta Was this translation helpful? Give feedback.
-
I can confirm I'm having the same issue. Likewise I would just use the binaries, but there's neither alsa nor pulse support built into the binary distribution. I tried fixing the errors manually and got Cython to build the Cython source to C, and then it explodes in the generated C source like so:
|
Beta Was this translation helpful? Give feedback.
-
Same here on python:alpine3.16, python:alpine3.17, python:alpine3.18, |
Beta Was this translation helpful? Give feedback.
-
I have the same problem:
|
Beta Was this translation helpful? Give feedback.
-
We tried pinning to |
Beta Was this translation helpful? Give feedback.
-
Cython seems to misgenerate the C, so even if you edit the .pyx files with errors and change the complaining function prototypes to "noexcept nogil" like I did, that doesn't fully fix the issue. I had to patch the machine-generated C code myself, wait until Cython got past that file in the build process, and quickly copy the patched version in. I ran What's interesting is it seems every Cython version I tried, as far back as 2019, misgenerated the C. Something unusual is broken. |
Beta Was this translation helpful? Give feedback.
-
It's an issue with Line 2 in 6982d81 A workaround is to add a constraint. However, flags are not passed when creating the isolated build environments. For that it's necessary to use an environment variable. Something like this works
|
Beta Was this translation helpful? Give feedback.
-
Can confirm this fixes the build issue. Thanks for the help @cdce8p! |
Beta Was this translation helpful? Give feedback.
-
@nicholas-presien Would you mind reopening this again? My solution is only a workaround, this still needs a real / committed fix. |
Beta Was this translation helpful? Give feedback.
-
hope this gets officially fixed soon :) |
Beta Was this translation helpful? Give feedback.
-
The problem is a lot of dependencies are not precompiled for Python 32 bit. |
Beta Was this translation helpful? Give feedback.
-
I am trying to trying to build pyav using the |
Beta Was this translation helpful? Give feedback.
-
Is there any fix to this issue? I am facing the same issue and cannot get it to work with the suggestion by @yubin-tech |
Beta Was this translation helpful? Give feedback.
-
Have there been any updates? I am facing the same issue. After trying the echo "cython<3.0" >> c.txt |
Beta Was this translation helpful? Give feedback.
-
I dropped to python 3.9 (seems to work) but another did come up when building the doc |
Beta Was this translation helpful? Give feedback.
-
I was able to get it to install on Ubuntu 22.04 / python3.10 with the following (in a venv):
(Note the use of "export" when setting the environment variable.) Furthermore, I confirmed that I was able to use the hevc_cuvid codec for decoding an h.265 video stream from python and making the frames available for online image processing (which was not available in the binar ffmpeg installed by av). |
Beta Was this translation helpful? Give feedback.
-
I'm using alpine 3.17 and the |
Beta Was this translation helpful? Give feedback.
-
@dschneider-l5 I tried it before deciding to drop the Python version because it did not work in my case. |
Beta Was this translation helpful? Give feedback.
-
I added
to the pyproject.toml but it doesn't solve the issue. |
Beta Was this translation helpful? Give feedback.
-
@dschneider-l5 did you install the ffmpeg libs seperately on Ubuntu 22.04? I will imagine these libs will installed during the build process, right?. Used your solution but got the following error on Ubuntu 22.04:
Though it seems it built the wheel but I cant see anything in the /tmp location. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
@ENate |
Beta Was this translation helpful? Give feedback.
-
How I got around the build issue temporarily is to build it directly from the source instead, and copy the binaries into the dist-package folded of the Python installation. |
Beta Was this translation helpful? Give feedback.
-
@yubin-tech can you explain how you did it? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, I had the exact same issue as @nicholas-presien . In my case, downgrading my Python version from 3.12 to 3.11.5 resolved the problem. |
Beta Was this translation helpful? Give feedback.
-
I get that this is fixed, but that is in major version 11. Maybe you would consider backporting it to 9 and 10? Projects rightfully specify deps on the major version, e.g. ^9, because that is as loose as you go without going between majors which are supposed to have breaking changes. So now, any project that has av ^9 or ^10 is broken, because there have been no patch versions with this fix... two entire unusable major versions (as constraining cython is not working for me, maybe because I have a requirement to do a Windows-based build)... although hopefully package authors can just update... |
Beta Was this translation helpful? Give feedback.
-
Overview
I'm currently using the stable version of PyAV (v9.0.2) in a docker container, and building in a docker image for a while with no issue. Recently, my docker image failed due to build errors in pyav when installing pyav using pip.
I'm building on a TX2NX dev kit, running Jetpack 4.6 with an arm64 compiled version of FFMPEG 4.3.2(https://launchpad.net/~jonathonf/+archive/ubuntu/ffmpeg-4), on python v3.6.9
Expected behavior
It should build without error
Actual behavior
It's now building with error, when nothing in the environment has changed due to it being in a docker container.
Build report:
Investigation
I've tried to run the build natively on the host using the python3 setup.py method, at branch v9.0.2, and I'm getting the same issue
Reproduction
This might be hard to reproduce since its ran on a Nvidia TX2NX Hardware
Versions
Research
I have done the following:
Beta Was this translation helpful? Give feedback.
All reactions