Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 ModuleNotFoundError: No module named "requests"
#1
I have a very simple script that saves me a lot of time scraping a few URLs on occasion. I ran the code just fine 2 weeks ago, and now when I go to run it, I get the error

Traceback (most recent call last):
  File "addevents.py", line 11, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
so, just for fun I ran

pip3.7 install requests
and I get the output

Requirement already satisfied: requests in /usr/local/lib/python3.7/site-packages (2.22.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests) (1.25.7)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests) (2019.9.11)
and sure enough when I run

help("modules")
I don't see "requests" anywhere. No clue what to do here. And I'm about to go insane. Please send help.

Python version 3.7.3
pip version 19.3.1
macOS 10.15.2
Quote
#2
First ideas what come to mind: do you use virtual environments and are you actually defaulting to using Python 3.7 (and not some other version).
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  requests module is not working varsh 3 100 Sep-10-2020, 03:53 PM
Last Post: buran
  Django getting ModuleNotFoundError: No module named '=' Malt 0 1,047 Aug-30-2019, 08:34 AM
Last Post: Malt
  No module named flask_themes voipsense 4 1,756 Feb-25-2019, 06:54 PM
Last Post: voipsense
  About .profile and ImportError: No module named RicardoAbdala 1 1,058 Aug-28-2018, 05:32 AM
Last Post: buran
  ImportError: No module named django.core.exceptions in google app engine timtinan37 4 2,179 Jun-18-2018, 01:34 PM
Last Post: Larz60+
  An Error in Requests Module pratheep 3 6,970 Feb-06-2018, 05:17 PM
Last Post: pratheep
  Using python requests module and BS4 to login on an Wordpress based website apollo 1 5,527 Feb-06-2018, 01:31 AM
Last Post: metulburr
  ImportError: No module named '_sqlite3' armanmax11 5 16,138 Dec-16-2017, 02:13 PM
Last Post: Larz60+
  disable proxy with requests module metulburr 2 5,852 Apr-05-2017, 02:54 AM
Last Post: metulburr

Forum Jump:


Users browsing this thread: 1 Guest(s)