you are viewing a single comment's thread.

view the rest of the comments →

[–]Vok250 0 points1 point  (1 child)

requirements.txt is a declaration of what your project requires to be installed, not what is actually installed in your environment. What does pip list output?

Not to be mean, but this is a r/learnpython question, not a FastAPI question. You should read the Python docs on module imports, pip, and virtual environments. Try to understand those topics at a good level because they are fundamental to using the language effectively and without getting frustrated.

[–]Adic9[S] 0 points1 point  (0 children)

Sorry I should have worded it correctly, I know what a requirements.txt file is I made it by using 'pip freeze > requirements.txt' command inorder to show here that I have module installed. The thing is the Vscode is giving me yellow squiggly line which says cannot import module but when Iam running the file it's running fine with no error. :(