Python Forum
No module named 'requests.packages'
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No module named 'requests.packages'
#1
When I try to run m python scrip I get this error:
Quote:Traceback (most recent call last):
  File "Main.py", line 9, in <module>
    from requests.packages.urllib3.exceptions import InsecureRequestWarning
ImportError: No module named 'requests.packages'

It is caused by this line:
from requests.packages.urllib3.exceptions import InsecureRequestWarning
I have installed both requests and urllib3. Is it possible that Python is looking for this in the wrong place?
Reply
#2
I doubt Python is looking at wrong place, it could be a library/version issue.
Here is a thread that resembles your problem a bit. But I don't know the specifics and can't be more particular, sorry.
Also if you plan to play with (un)installing pip or different module versions, I recommend to make use of a virtual environment while experimenting.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ModuleNotFoundError: No module named 'tkcalendar', Thonny, Windows 10 Edward_ 4 326 Yesterday, 07:56 PM
Last Post: Edward_
  No module named 'importlib.metadata' EdVS 3 918 Jan-30-2025, 09:55 AM
Last Post: Larz60+
  ModuleNotFoundError: No module named 'athena_read' raman 2 1,236 Jul-01-2024, 07:52 AM
Last Post: Gribouillis
  no module named 'docx' when importing docx MaartenRo 1 5,287 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 30,850 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 9,572 Oct-29-2023, 11:33 PM
Last Post: Serg
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 4,316 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 3,686 Aug-07-2023, 05:32 AM
Last Post: DPaul
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 2 3,111 Jul-10-2023, 03:37 AM
Last Post: Wimpy_Wellington
  How to fix this error: ModuleNotFoundError: No module named 'notears' yaoyao22 2 2,366 Jul-09-2023, 11:24 AM
Last Post: yaoyao22

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020