Python Forum
ImportError: cannot import name 'Request' from 'request' - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: ImportError: cannot import name 'Request' from 'request' (/thread-27716.html)



ImportError: cannot import name 'Request' from 'request' - abhishek81py - Jun-18-2020

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.


RE: ImportError: cannot import name 'Request' from 'request' - buran - Jun-18-2020

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?