ModuleNotFoundError: No module named 'requests' in PyCharm
Solution 1
you can use this :
just go to file > sitting > project : name > project interpreter > add > search and install
Solution 2
I am guessing you have not set your interpreter or installed the necessary packages in the interpreter in PyCharm.
- Can you check in your
File -> Settings
There, on the side panel, you can open your Project: <project_name> and check Project Interpreter
This will show the interpreter and the installed packages which you can use.
If the interpreter is empty, you need to add it.
https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html
Hope this helps.
MUHAMMAD AHMAD L1F14BSCS0435
Updated on June 09, 2022Comments
-
MUHAMMAD AHMAD L1F14BSCS0435 almost 2 years
I have a python code in PyCharm in which i am using import requests but the terminal is showing me the following error:
(venv) ahmad@Ahmad:~/Desktop/Spiders$ python test.py Traceback (most recent call last): File "test.py", line 1, in import requests ModuleNotFoundError: No module named 'requests'
But I have installed pip and requests as well.
-
rv.kvetch over 2 yearsThis does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From Review