NovFora Dev

Issue: Can't deploy Python app to Docker -- getting "ModuleNotFoundError" even though requirements are in the Dockerfile.

Taylor Davis

Taylor Davis

4 months ago

The container runs but fails when it tries to import a package I know is listed in requirements.txt. I have an apt-get install line and then pip install -r requirements.txt, so that should be correct. A few things I've tried: rebuilding without cache, using a different base image (python:3.9-slim vs python:3.10), and verifying the path in my Dockerfile. Still no luck. Any idea what might be wrong?

Join the conversation to leave a reply.

Sign in to reply

Related topics