-
Notifications
You must be signed in to change notification settings - Fork 368
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
Pip install is failing to build due to av/logging.pyx error #1140
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. |
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 😄 |
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:
|
Same here on python:alpine3.16, python:alpine3.17, python:alpine3.18, |
I have the same problem:
|
We tried pinning to |
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. |
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
|
Can confirm this fixes the build issue. Thanks for the help @cdce8p! |
@nicholas-presien Would you mind reopening this again? My solution is only a workaround, this still needs a real / committed fix. |
hope this gets officially fixed soon :) |
Mostly it seems that cython wants you to declare things as `noexcept` Closes PyAV-Org#1140 I'm going to see if I can report the bug to cython, but it is hard for me to create a minimum reproducible example
The problem is a lot of dependencies are not precompiled for Python 32 bit. |
I am trying to trying to build pyav using the |
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 |
Have there been any updates? I am facing the same issue. After trying the echo "cython<3.0" >> c.txt |
I dropped to python 3.9 (seems to work) but another did come up when building the doc |
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). |
I'm using alpine 3.17 and the |
@dschneider-l5 I tried it before deciding to drop the Python version because it did not work in my case. |
I added
to the pyproject.toml but it doesn't solve the issue. |
@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? |
@ENate |
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. |
@yubin-tech can you explain how you did it? Thanks |
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. |
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... |
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:
The text was updated successfully, but these errors were encountered: