Python Forum
ImportError: cannot import name 'Request' from 'request'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ImportError: cannot import name 'Request' from 'request'
#1
When i install "http module" using this command "pip3 install http" an error was occurred
Error:
ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6yu_t3dd/http/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6yu_t3dd/http/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-6yu_t3dd/http/pip-egg-info cwd: /tmp/pip-install-6yu_t3dd/http/ Complete output (7 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-6yu_t3dd/http/setup.py", line 3, in <module> import http File "/tmp/pip-install-6yu_t3dd/http/http/__init__.py", line 17, in <module> from request import Request ImportError: cannot import name 'Request' from 'request' (/home/abhishek/.local/lib/python3.8/site-packages/request/__init__.py) ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
how to solve this.
Reply
#2
if you are trying to install this http package - it's python2 and from 2012
it also looks like you have request package installed and it interfierce with the request module in http package
But why do you try to install it in the first place?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Triggering a ps1 script in remote windows server via http python request jasveerjassi 1 321 Jan-26-2024, 07:02 PM
Last Post: deanhystad
  Is it possible to add a delay right after a request.get() cubangt 6 2,347 Sep-07-2023, 09:29 AM
Last Post: shoesinquiry
  How would I alter this to a single api request? SuchUmami 1 715 Jun-24-2023, 08:30 AM
Last Post: ferdnyc
Question Cannot import easysnmp: ImportError: libnetsnmp.so.30 Calab 4 1,000 Jun-08-2023, 08:52 PM
Last Post: Gribouillis
  Request Dependency warning thetechnodino 0 907 Dec-20-2022, 02:12 AM
Last Post: thetechnodino
  How to output one value per request of the CSV and print it in another func? Student44 3 1,279 Nov-11-2022, 10:45 PM
Last Post: snippsat
  Unable to request image from FORM Data usman 0 968 Aug-18-2022, 06:23 PM
Last Post: usman
  Repeat request by else stsxbel 2 1,150 Jul-30-2022, 03:34 PM
Last Post: stsxbel
  request.get to read large response pythonlearner1 7 3,051 Apr-05-2022, 08:21 PM
Last Post: pythonlearner1
  alternative to using request module in python vlearner 2 1,291 Feb-05-2022, 09:35 AM
Last Post: ibreeden

Forum Jump:

User Panel Messages

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