-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
seems missing _ffi.abi3.so when pip installing in docker #67
Comments
Could it be that the build of the C extension fails? When use alpine, you can't use wheels and have to compile all your C extensions yourself. |
This could be the reason, but from the records of building docker, I didn't see any errors generated from there.
|
There is something going very wrong. It says
But then it says
!? This looks like an old-fashioned packaging FUBAR to me TBH. |
oh its a mistake of pasting, sry on that part. I did try downgrade the version but still failed on installation
|
# Python build stage
FROM python:3.6-alpine3.10
ENV PYTHONUNBUFFERED 1
RUN apk update \
# psycopg2 dependencies
&& apk add --virtual build-deps gcc python3-dev musl-dev \
# Pillow dependencies
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
# for grpcio
&& apk add linux-headers build-base \
# CFFI dependencies
&& apk add libffi-dev py-cffi
RUN pip install --no-cache-dir argon2-cffi==19.1.0
USER root
WORKDIR /app
ENTRYPOINT ["/bin/sh"]
Thats the simplified version, after goes into shell, when trying to import argon2, there comes
|
If I change it to |
Yes, this resolved my problem, thanks! |
Hi,
We encountered a weird error when installing the argon2 in Alpine Linux Docker.
When using the argon2 as part of hasher in Django, it triggers an error saying
Couldn't load 'Argon2PasswordHasher' algorithm library: No module named 'argon2._ffi'
After we looked into the docker's site-package, we found that the argon2 directory is missing the
_ffi.abi3.so
file which generates this error. We rebuilt the docker several times and the error still exists, it can be reproduced every time.Python: 3.6.10
Docker base image: python3.6-alpine3.10
Django: 2.2.4
Argon2: 19.1.0
So is there any better solutions than copying so file directly into docker? and I was wondering what makes this happen?
The text was updated successfully, but these errors were encountered: