Importerror: No Module Named Requests

ImportError: No module named requests: But it is installed already

Try checking your Python versions. It's quite possible that you have Requests installed in one interpreter, while Atom uses another.

Run your script directly in the command line.

Python: ModuleNotFoundError: No module named 'requests'

If "pip freeze" lists the module, then one option will be to close the idle and type the following at the command prompt/terminal.

python -m idlelib

New IDLE will start and it should be possible to import the module.

No module named requests' even if I installed requests with pip

I am not 100% sure, but the paths from which python and which pip may indicate that you have two versions installed. The Python version being the old one that was shipped with OS X, and another version.

I would advice you to install Python27 (or even better Python3) from brew.

You can install brew with a single command, and another one for installing Python27/3. When this is done you set the PATH variable in your shell rc file and you should be good to go.

I have Python27 installed (via brew) and my (working environment) reports the following paths:

which python: /usr/local/bin/python
which pip: /usr/local/bin/pip

And

python --version: 2.7.15
pip --version: pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python2.7)


Related Topics



Leave a reply



Submit