ModuleNotFoundError (youtube-transcript-api) even after including it in requirements.txt

Hi there, I have been having troubles deploying my codes. I have put in all dependencies in a requirements.txt file.
this is my github repo: GitHub - lishing/youtube-assistant

The modules which are not found are dotenv, code (which is code.py, a file that will read in the codes).

Typo in file name: requirements.txt

1 Like

the file name should be requirements.txt

why did you renamed it from requirements.txt to requirement.txt before?

1 Like

Hi thanks both. I have renamed it as requirements.txt. I tried both requirements.txt and requirement.txt but it is still showing the same error.

Also I have an error when I tried to include the dependencies from another file name code.py. Should I be including it in requirements.txt too? It works well locally.

Error:

File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
File "/mount/src/youtube-assistant/main.py", line 1, in <module>
    import code as cd
File "/mount/src/youtube-assistant/code.py", line 4, in <module>
    from youtube_transcript_api import YouTubeTranscriptApi

Hi everyone, I solved this by rebooting the app, and specified the dependences. I did not use dotenv, and fixed faiss into faiss-cpu in requirements.txt.

Thank you everyone!

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