Code Monkey home page Code Monkey logo

Comments (7)

hynek avatar hynek commented on June 20, 2024 1

If I change it to argon2-cffi==20.1.0 it works for me – same for you?

from argon2-cffi.

hynek avatar hynek commented on June 20, 2024

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.

from argon2-cffi.

CACppuccino avatar CACppuccino commented on June 20, 2024

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.

Collecting argon2-cffi==19.1.0
  Downloading argon2_cffi-19.1.0.tar.gz (1.8 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'

...

Building wheel for argon2-cffi (setup.py): started
  Building wheel for argon2-cffi (setup.py): finished with status 'done'
  Created wheel for argon2-cffi: filename=argon2_cffi-16.0.0-cp36-cp36m-linux_x86_64.whl size=37754 sha256=e41e66f9f81a7e75bdf69c7c8c8a7ea90a7d95419c22450fec6793591102cc63
  Stored in directory: /tmp/pip-ephem-wheel-cache-bw4l_lpc/wheels/3b/31/e5/816e76bc4496b810ac0eb9452fc96858c08155a06d5c877583

from argon2-cffi.

hynek avatar hynek commented on June 20, 2024

There is something going very wrong. It says

Collecting argon2-cffi==19.1.0

But then it says

Created wheel for argon2-cffi: filename=argon2_cffi-16.0.0-cp36-cp36m-linux_x86_64.whl

!?

This looks like an old-fashioned packaging FUBAR to me TBH.

from argon2-cffi.

CACppuccino avatar CACppuccino commented on June 20, 2024

oh its a mistake of pasting, sry on that part. I did try downgrade the version but still failed on installation

Collecting argon2-cffi==16.0.0
  Downloading argon2_cffi-16.0.0.tar.gz (822 kB)

Building wheel for argon2-cffi (setup.py): started
  Building wheel for argon2-cffi (setup.py): finished with status 'done'
  Created wheel for argon2-cffi: filename=argon2_cffi-16.0.0-cp36-cp36m-linux_x86_64.whl size=37754 sha256=e41e66f9f81a7e75bdf69c7c8c8a7ea90a7d95419c22450fec6793591102cc63
  Stored in directory: /tmp/pip-ephem-wheel-cache-bw4l_lpc/wheels/3b/31/e5/816e76bc4496b810ac0eb9452fc96858c08155a06d5c877583

from argon2-cffi.

CACppuccino avatar CACppuccino commented on June 20, 2024
# 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

/app # python
Python 3.6.10 (default, May 21 2020, 06:00:59) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import argon2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/argon2/__init__.py", line 5, in <module>
    from . import exceptions, low_level
  File "/usr/local/lib/python3.6/site-packages/argon2/low_level.py", line 17, in <module>
    from ._ffi import ffi, lib
ModuleNotFoundError: No module named 'argon2._ffi'

from argon2-cffi.

CACppuccino avatar CACppuccino commented on June 20, 2024

If I change it to argon2-cffi==20.1.0 it works for me – same for you?

Yes, this resolved my problem, thanks!

from argon2-cffi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.