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
  ImportError: cannot import name 'NullHandler' from 'logging' sukanta80 0 629 Jul-28-2025, 03:26 PM
Last Post: sukanta80
  ImportError: cannot import name 'Pyfhel' from 'Pyfhel' Anldra12 11 8,145 Jun-16-2025, 07:08 AM
Last Post: ItsTheGoose
  NEED HELP WITH REQUEST PACKAGE Ishan69 1 1,166 Mar-05-2025, 06:55 PM
Last Post: noisefloor
  Python Newbing on IDEa of HTTPs Request.get JSONnose.Picker ajaxstardust 1 1,553 Aug-28-2024, 07:17 AM
Last Post: Larz60+
  ImportError: cannot import name 'scipy_namespace_for' from 'scipy._lib._array_api' AgileAVS 0 3,962 Jul-15-2024, 08:45 AM
Last Post: AgileAVS
  Triggering a ps1 script in remote windows server via http python request jasveerjassi 1 1,592 Jan-26-2024, 07:02 PM
Last Post: deanhystad
  Is it possible to add a delay right after a request.get() cubangt 6 13,840 Sep-07-2023, 09:29 AM
Last Post: shoesinquiry
  How would I alter this to a single api request? SuchUmami 1 3,037 Jun-24-2023, 08:30 AM
Last Post: ferdnyc
Question Cannot import easysnmp: ImportError: libnetsnmp.so.30 Calab 4 3,141 Jun-08-2023, 08:52 PM
Last Post: Gribouillis
  Request Dependency warning thetechnodino 0 2,304 Dec-20-2022, 02:12 AM
Last Post: thetechnodino

Forum Jump:

User Panel Messages

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