Import requests working on Windows shell but not in PyCharm
Question:
The simple import of requests
import requests
can be executes and used in windows shell but the same code says in pycharm:
Traceback (most recent call last):
File "C:/Users/XPS13/PycharmProjects/Testing/Webcrawler_Test.py", line 1, in
<module>
import requests
ModuleNotFoundError: No module named 'requests'
requests was correctly pip installed. Even uninstalling and reinstalling doesn’t work.
Any help would be appreciated.
Answers:
You need to configure the project interpreter in PyCharm:
- Go to Settings/Preferences
- Select Project Interpreter
- Click the little gear and click Add…
- Select the appropriate interpreter (whether a virtual environment or system python installation)
Yeah so this might be a little late but I fixed my problem like this:
- Go to Settings/Preferences
- Select Project Interpreter
- And press the + button on the left side
- Search for requests
- And press Install Package
I am running:
Windows 10
Python 3.7.1
The simple import of requests
import requests
can be executes and used in windows shell but the same code says in pycharm:
Traceback (most recent call last):
File "C:/Users/XPS13/PycharmProjects/Testing/Webcrawler_Test.py", line 1, in
<module>
import requests
ModuleNotFoundError: No module named 'requests'
requests was correctly pip installed. Even uninstalling and reinstalling doesn’t work.
Any help would be appreciated.
You need to configure the project interpreter in PyCharm:
- Go to Settings/Preferences
- Select Project Interpreter
- Click the little gear and click Add…
- Select the appropriate interpreter (whether a virtual environment or system python installation)
Yeah so this might be a little late but I fixed my problem like this:
- Go to Settings/Preferences
- Select Project Interpreter
- And press the + button on the left side
- Search for requests
- And press Install Package
I am running:
Windows 10
Python 3.7.1