-
Notifications
You must be signed in to change notification settings - Fork 246
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
No longer able to install in python:alpine docker container #232
Comments
There have been no changes to greenlet since the last release in January, so if something changed I don't think it is on greenlet's part. It's not possible to distribute compiled, native, binary wheels on PyPI for Alpine Linux (in general, any distribution not based on glibc), so people using those platforms together with native Python extensions (typically written in C, like greenlet is) will need to be sure their platform has a functioning compiler toolchain, or arrange to build and host binary wheels somewhere else. In this case, it looks like the container is missing the basic compiler toolchain (gcc). |
Thanks for the info. I'm actually installing the cryptography module into the same container, so I've added the following line:
I'll start looking into what changed in the latest version of the container now. |
Actually, I'm going to close this out since the change wasn't in greenlet. Thanks! |
@tarrenj Have you been able to figure out what is causing this issue? I am running into the same error. I am not sure which one of my dependencies is using greenlet but I see this error
and then this
I'd appreciate any help |
@pbhoiwala This popped up in my work stuff and I'm on a tight deadline, so I just switched to the If I had more time to look into it I'd start by looking at the latest changes to the official image and see if I notice anything that stands out. Another good option would be opening a shell in a I hope to switch back to the Alpine image soon, if I can find the time to do that I'll update here. Also, I just saw this and it may be of interest to you: https://pythonspeed.com/articles/alpine-docker-python/ |
@tarrenj Thank you very much for the help. I appreciate it. |
Does anyone know if building on the latest Alpine image is successful again? |
@tarrenj had the same issue installing greenlet as a dependency for bcrypt with flask. Adding g++ as part of the compiler toolchain fixed it. |
@mholubinka1 Thanks for the additional information! |
@mholubinka1 how did you add g++ compiler toolchain? |
RUN apk add build-base my code below
|
@dejurin thanks mate, it worked for me! |
Hello!
Late last week my containers were building fine, but they're no longer building. I've been able to reproduce the build error with
docker run -it python:alpine pip3 install greenlet
It looks like the failing line is:
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.9 -c src/greenlet/greenlet.c -o build/temp.linux-x86_64-3.9/src/greenlet/greenlet.o
resulting inerror: command 'gcc' failed: No such file or directory
sprunge link of the full build error
The text was updated successfully, but these errors were encountered: