Python Forum

Full Version: ModuleNotFoundError: No module named 'requests'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
It shows to be installed
(Oct-29-2023, 10:15 PM)menator01 Wrote: [ -> ]It shows to be installed

Then why does it show the following?

import requests
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
What is pyshell?
From the documentation

As a Python library, PyShell is inherently cross platform. However, PyShell is currently only tested on Linux and a few of the shell commands invoke unix commands. If running on Windows, the current recommendation is to have Git for Windows installed and have its bin directory added to your PATH. This will ensure that all PyShell commands function as expected.


This may be your problem.
You have two version installed one from python.org and one from Microsoft app store.
python3 never work on Windows if not have app store version.
Do this in cmd and you will see two different Paths.
where python
where python3
The error in IDLE from comes from that you use python.org version,and not the app store version.
If do this it will work,also no 3
python -m pip install requests
But you should fix so have one version of Python 3.11 and not 2.
(Oct-29-2023, 10:33 PM)snippsat Wrote: [ -> ]You have two version installed one from python.org and one from Microsoft app store.
python3 never work on Windows if not have app store version.
Do this in cmd and you will see two different Paths.
where python
where python3
The error in IDLE from comes from that you use python.org version,and not the app store version.
If do this it will work,also no 3
python -m pip install requests
But you should fix so have one version of Python 3.11 and not 2.

What need to do? Install python3 only from the app store?
(Oct-29-2023, 10:40 PM)Serg Wrote: [ -> ]What need to do? Install python3 only from the app store?
Show output from.
where python
where python3
pip --version
Your first post show the problem when you do python --version it show 3.11.6.
In image of IDLE it Show 3.11.4
So there is mismatch not same Python 3.11... versions.
(Oct-29-2023, 10:55 PM)snippsat Wrote: [ -> ]
(Oct-29-2023, 10:40 PM)Serg Wrote: [ -> ]What need to do? Install python3 only from the app store?
Show output from.
where python
where python3
pip --version
Your first post show the problem when you do python --version it show 3.11.6.
In image of IDLE it Show 3.11.4
So there is mismatch not same Python 3.11... versions.

Thank you so much!!! Everything worked out!
(Oct-29-2023, 10:33 PM)snippsat Wrote: [ -> ]You have two version installed one from python.org and one from Microsoft app store.
python3 never work on Windows if not have app store version.
Do this in cmd and you will see two different Paths.
where python
where python3
The error in IDLE from comes from that you use python.org version,and not the app store version.
If do this it will work,also no 3
python -m pip install requests
But you should fix so have one version of Python 3.11 and not 2.

Thank you so much!!! Everything worked out!
Pages: 1 2