How do I fix 'ModuleNotFoundError' in Python when pip says the package is already installed?

0votes

Windows 11, Python 3.12. I have both the python.org installer and the Microsoft Store version of Python installed. I run scripts sometimes with python script.py and sometimes with py script.py. I installed a package with pip install requests and it reported success.

After a successful pip install, import requests should work when I run my script.

Running the script raises ModuleNotFoundError: No module named 'requests', even though pip list shows requests as installed.

Question comments

Short clarifications and follow-ups about the question itself.

No comments yet.

0 Answers

No answers yet

There are no published answers to show.

Your answer

Sign in to share a solution.