ModuleNotFoundError with Pipenv and requirements.txt

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. Are you running your app locally or is it deployed?
  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform?
    b. Share the link to the public deployed app.
  3. Share the link to your app’s public GitHub repository (including a requirements file).
  4. Share the full text of the error message (not a screenshot).
  5. Share the Streamlit and Python versions.

Hey everyone,
I have a problem with importing the needed libraries. It always gives me a ModuleNotFoundError.

  1. and 2. App is deployed on the Community Cloud. You can find it here:

  2. I made the repo public for inspection but I would prefer to keep it private after the issue is solved.
    GitHub - Wolftess/LID: A language identification systems working for over 400 languages, including several German dialects like Tyrolean, Swabian and Low Saxon.. The folder contains a requirements.txt, but this should not be necessary for compilation as I am using pipenv. the requirements file is just for Pipfile compilation.

  3. Here is the error message:
    ModuleNotFoundError: No module named ‘tensorflow’
    2023-11-03 14:04:48.653 Uncaught app exception
    Traceback (most recent call last):
    File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/”, line 534, in _run_script

    exec(code, module.dict)

File “/mount/src/lid/”, line 2, in

import tensorflow
  1. The Python version I specified is 3.10.12… I am using the most recent streamlit version.

I already tried a lot of approaches:

  1. Making the repo public and private → no success
  2. using a requirements.txt → no success
  3. using Pipfile → no success
  4. Checking out different spellings → no success
  5. Using just requirements.txt or Pipfile vs. using only Pipfile → no success.

I would be very glad if the team could have a look at this issue.
Thanks a lot in advance =)))

  • remove the Pipfile’s from the github repo
  • reboot the app
1 Like

Hi Franky,
thanks for the fast reply. I didnt even have to remove the Pipfiles. I just didnt know about the Reboot-Option. Thanks a lot!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.