ModuleNotFound Error while installing requirements in DockerImage

Viewed 68

I have created one DockerImage, with python-slimbuster 3.9.7

And My Installing Requirements by downloading the File by wget and installing from pip

DockerFile

FROM python:3.9.7-slim-buster
RUN export DEBIAN_FRONTEND=noninteractive
RUN wget -O file.txt git_raw_url
RUN pip3 install -r file.txt
CMDS [...]

and at Installation line, i gets

#14 3.410       File "<string>", line 1, in <module>
#14 3.410       File "/tmp/pip-req-build-9t14tyvu/setup.py", line 4, in <module>
#14 3.410         from carbonnow import __version__
#14 3.410       File "/tmp/pip-req-build-9t14tyvu/carbonnow/__init__.py", line 2, in <module>
#14 3.410         from .client import Carbon  # noqa: F401
#14 3.410       File "/tmp/pip-req-build-9t14tyvu/carbonnow/client.py", line 5, in <module>
#14 3.410         import aiohttp
#14 3.410     ModuleNotFoundError: No module named 'aiohttp'

And even, aiohttp is top requirement in files.txt.

And if i add

RUN pip3 install aiohttp.. other reqs...

it works without creating any problem

And this occurs for almost all requirement in files.txt

Is there anything, i am doing wrong?

0 Answers
Related