0

I'm installing argon2 for Python with RUN apk add py3-argon2-cffi. This installs the Python argon2 package from Alpine (https://alpine.pkgs.org/3.14/alpine-community-x86_64/py3-argon2-cffi-20.1.0-r1.apk.html). When I try to import it with import argon2 I get

ModuleNotFoundError: No module named 'argon2'

I don't want to install argon2 with pip because I don't have gcc installed. gccwould tripple my container size and I need a small container so I tried to use the Alpine argon2 package.

Do you have any advice?

ComanderKai77
  • 460
  • 6
  • 14
  • Are you 100% you don't have a python2 and python3 version living on the container? I cannot reproduce from my side from `alpine:latest` if I do `apk add py3-argon2-cffi py3-six` then `python3` and `import argon2`, all works. – β.εηοιτ.βε Jul 23 '21 at 18:15
  • Also note that, on Alpine, you can easily add a meta virtual package for packages that are just there at build time then remove them later (See https://stackoverflow.com/questions/46221063/what-is-build-deps-for-apk-add-virtual-command) – β.εηοιτ.βε Jul 23 '21 at 18:19
  • With `alpine:latest` it works but not with `python:alpine`. I thought that `python:alpine` is `alpine:latest` with preinstalled python, pip, etc.. – ComanderKai77 Jul 23 '21 at 18:23
  • I've switched to `alpine:latest` and even redurced my image sice further. Thank you so much - it is workig. – ComanderKai77 Jul 23 '21 at 18:29

0 Answers0