requests-html
requests-html copied to clipboard
pip install requests-html failed
pip install requests_html
Collecting requests_html
Using cached requests_html-0.6.6-py2.py3-none-any.whl (13 kB)
Requirement already satisfied: requests in e:\software\python 3.5\lib\site-packages (from requests_html) (2.23.0)
Collecting parse
Using cached parse-1.15.0.tar.gz (29 kB)
Requirement already satisfied: bs4 in e:\software\python 3.5\lib\site-packages (from requests_html) (0.0.1)
Collecting pyppeteer
Using cached pyppeteer-0.0.25.tar.gz (1.2 MB)
ERROR: Command errored out with exit status 1:
command: 'e:\software\python 3.5\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MUA\\AppData\\Local\\Temp\\pip-install-mpmpuszp\\pyppeteer\\setup.py'"'"'; __file__='"'"'C:\\Users\\MUA\\AppData\\Local\\Temp\\pip-install-mpmpuszp\\pyppeteer\\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 'C:\Users\MUA\AppData\Local\Temp\pip-pip-egg-info-pkzb3uww'
cwd: C:\Users\MUA\AppData\Local\Temp\pip-install-mpmpuszp\pyppeteer\
Complete output (33 lines):
Requirement already satisfied: py-backwards in e:\software\python 3.5\lib\site-packages (0.7)
Requirement already satisfied: py-backwards-astunparse in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.5.0.post3)
Requirement already satisfied: typed-ast in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.4.1)
Requirement already satisfied: autopep8 in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.5.3)
Requirement already satisfied: colorama in e:\software\python 3.5\lib\site-packages (from py-backwards) (0.4.3)
Requirement already satisfied: six<2.0,>=1.6.1 in e:\software\python 3.5\lib\site-packages (from py-backwards-astunparse->py-backwards) (1.14.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in e:\software\python 3.5\lib\site-packages (from py-backwards-astunparse->py-backwards) (0.33.6)
Requirement already satisfied: toml in e:\software\python 3.5\lib\site-packages (from autopep8->py-backwards) (0.10.1)
Requirement already satisfied: pycodestyle>=2.6.0 in e:\software\python 3.5\lib\site-packages (from autopep8->py-backwards) (2.6.0)
Traceback (most recent call last):
File "C:\Users\MUA\AppData\Local\Temp\pip-install-mpmpuszp\pyppeteer\setup.py", line 19, in <module>
from py_backwards.compiler import compile_files
File "e:\software\python 3.5\lib\site-packages\py_backwards\compiler.py", line 8, in <module>
from .files import get_input_output_paths, InputOutput
File "e:\software\python 3.5\lib\site-packages\py_backwards\files.py", line 9, in <module>
from .exceptions import InvalidInputOutput, InputDoesntExists
File "e:\software\python 3.5\lib\site-packages\py_backwards\exceptions.py", line 1, in <module>
from typing import Type, TYPE_CHECKING
ImportError: cannot import name 'Type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MUA\AppData\Local\Temp\pip-install-mpmpuszp\pyppeteer\setup.py", line 25, in <module>
from py_backwards.compiler import compile_files
File "e:\software\python 3.5\lib\site-packages\py_backwards\compiler.py", line 8, in <module>
from .files import get_input_output_paths, InputOutput
File "e:\software\python 3.5\lib\site-packages\py_backwards\files.py", line 9, in <module>
from .exceptions import InvalidInputOutput, InputDoesntExists
File "e:\software\python 3.5\lib\site-packages\py_backwards\exceptions.py", line 1, in <module>
from typing import Type, TYPE_CHECKING
ImportError: cannot import name 'Type'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Here it is.
Its not requests_html
it's requests-html
.
try this:
pip install requests-html
oppsss.. thanks @sagar1025
I thought it was a silly mistake of mine, but I don't think it is :
C:\Users\MUA>pip install requests-html
Collecting requests-html
Using cached requests_html-0.6.6-py2.py3-none-any.whl (13 kB)
Collecting w3lib
Using cached w3lib-1.22.0-py2.py3-none-any.whl (20 kB)
Collecting fake-useragent
Using cached fake-useragent-0.1.11.tar.gz (13 kB)
Collecting parse
Using cached parse-1.15.0.tar.gz (29 kB)
Collecting pyquery
Using cached pyquery-1.4.1-py2.py3-none-any.whl (22 kB)
Requirement already satisfied: requests in e:\software\python 3.5\lib\site-packages (from requests-html) (2.23.0)
Collecting pyppeteer
Using cached pyppeteer-0.0.25.tar.gz (1.2 MB)
ERROR: Command errored out with exit status 1:
command: 'e:\software\python 3.5\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MUA\\AppData\\Local\\Temp\\pip-install-0l2bho8m\\pyppeteer\\setup.py'"'"'; __file__='"'"'C:\\Users\\MUA\\AppData\\Local\\Temp\\pip-install-0l2bho8m\\pyppeteer\\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 'C:\Users\MUA\AppData\Local\Temp\pip-pip-egg-info-jj8zcoww'
cwd: C:\Users\MUA\AppData\Local\Temp\pip-install-0l2bho8m\pyppeteer\
Complete output (33 lines):
Requirement already satisfied: py-backwards in e:\software\python 3.5\lib\site-packages (0.7)
Requirement already satisfied: autopep8 in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.5.3)
Requirement already satisfied: typed-ast in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.4.1)
Requirement already satisfied: py-backwards-astunparse in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.5.0.post3)
Requirement already satisfied: colorama in e:\software\python 3.5\lib\site-packages (from py-backwards) (0.4.3)
Requirement already satisfied: toml in e:\software\python 3.5\lib\site-packages (from autopep8->py-backwards) (0.10.1)
Requirement already satisfied: pycodestyle>=2.6.0 in e:\software\python 3.5\lib\site-packages (from autopep8->py-backwards) (2.6.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in e:\software\python 3.5\lib\site-packages (from py-backwards-astunparse->py-backwards) (0.33.6)
Requirement already satisfied: six<2.0,>=1.6.1 in e:\software\python 3.5\lib\site-packages (from py-backwards-astunparse->py-backwards) (1.14.0)
Traceback (most recent call last):
File "C:\Users\MUA\AppData\Local\Temp\pip-install-0l2bho8m\pyppeteer\setup.py", line 19, in <module>
from py_backwards.compiler import compile_files
File "e:\software\python 3.5\lib\site-packages\py_backwards\compiler.py", line 8, in <module>
from .files import get_input_output_paths, InputOutput
File "e:\software\python 3.5\lib\site-packages\py_backwards\files.py", line 9, in <module>
from .exceptions import InvalidInputOutput, InputDoesntExists
File "e:\software\python 3.5\lib\site-packages\py_backwards\exceptions.py", line 1, in <module>
from typing import Type, TYPE_CHECKING
ImportError: cannot import name 'Type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MUA\AppData\Local\Temp\pip-install-0l2bho8m\pyppeteer\setup.py", line 25, in <module>
from py_backwards.compiler import compile_files
File "e:\software\python 3.5\lib\site-packages\py_backwards\compiler.py", line 8, in <module>
from .files import get_input_output_paths, InputOutput
File "e:\software\python 3.5\lib\site-packages\py_backwards\files.py", line 9, in <module>
from .exceptions import InvalidInputOutput, InputDoesntExists
File "e:\software\python 3.5\lib\site-packages\py_backwards\exceptions.py", line 1, in <module>
from typing import Type, TYPE_CHECKING
ImportError: cannot import name 'Type'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
C:\Users\MUA>
Seems like you're on python 3.5
You will have to upgrade your python
to install this.
The documentation says that only Python 3.6 and above is supported.
ok, i will check it out thanks
Its not
requests_html
it'srequests-html
.
@sagar1025 Both will work, I just installed requests_html
and it worked just fine.
today, I experienced same error: code used: from requests_html import HTMLSession session = HTMLSession()
I realize that this error is not within "requests-html" but rests with a dependency "fake-useragent" but the module did fail when used.
Is "fake-useragent" dependency on a website "useragentstring.com" problematic (obsolete)?
Ubuntu 18.04.4 LTS Kernel: Linux 5.3.0-62-generic python v3.6.9 python IDE PyCharm 2020.2 EAP (Community Edition) Build #PC-202.6109.24 requests-html v0.10.0
pip install requests-html (success)
error msg:
/usr/bin/python3.6 /snap/pycharm-community/200/plugins/python-ce/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 39103 --file //my/path/to/this/my.py
pydev debugger: process 7553 is connecting
Connected to pydev debugger (build 202.6109.24)
Traceback (most recent call last):
File "
@nhwalkman For some reason gevent
is using the Python 2 syntax for exceptions. In Python 3 the line should be except Exception as ex:
. I would suggest upgrading gevent and seeing if the error recurs.
pip install requests_html Collecting requests_html Using cached requests_html-0.6.6-py2.py3-none-any.whl (13 kB) Requirement already satisfied: requests in e:\software\python 3.5\lib\site-packages (from requests_html) (2.23.0) Collecting parse Using cached parse-1.15.0.tar.gz (29 kB) Requirement already satisfied: bs4 in e:\software\python 3.5\lib\site-packages (from requests_html) (0.0.1) Collecting pyppeteer Using cached pyppeteer-0.0.25.tar.gz (1.2 MB) ERROR: Command errored out with exit status 1: command: 'e:\software\python 3.5\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MUA\\AppData\\Local\\Temp\\pip-install-mpmpuszp\\pyppeteer\\setup.py'"'"'; __file__='"'"'C:\\Users\\MUA\\AppData\\Local\\Temp\\pip-install-mpmpuszp\\pyppeteer\\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 'C:\Users\MUA\AppData\Local\Temp\pip-pip-egg-info-pkzb3uww' cwd: C:\Users\MUA\AppData\Local\Temp\pip-install-mpmpuszp\pyppeteer\ Complete output (33 lines): Requirement already satisfied: py-backwards in e:\software\python 3.5\lib\site-packages (0.7) Requirement already satisfied: py-backwards-astunparse in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.5.0.post3) Requirement already satisfied: typed-ast in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.4.1) Requirement already satisfied: autopep8 in e:\software\python 3.5\lib\site-packages (from py-backwards) (1.5.3) Requirement already satisfied: colorama in e:\software\python 3.5\lib\site-packages (from py-backwards) (0.4.3) Requirement already satisfied: six<2.0,>=1.6.1 in e:\software\python 3.5\lib\site-packages (from py-backwards-astunparse->py-backwards) (1.14.0) Requirement already satisfied: wheel<1.0,>=0.23.0 in e:\software\python 3.5\lib\site-packages (from py-backwards-astunparse->py-backwards) (0.33.6) Requirement already satisfied: toml in e:\software\python 3.5\lib\site-packages (from autopep8->py-backwards) (0.10.1) Requirement already satisfied: pycodestyle>=2.6.0 in e:\software\python 3.5\lib\site-packages (from autopep8->py-backwards) (2.6.0) Traceback (most recent call last): File "C:\Users\MUA\AppData\Local\Temp\pip-install-mpmpuszp\pyppeteer\setup.py", line 19, in <module> from py_backwards.compiler import compile_files File "e:\software\python 3.5\lib\site-packages\py_backwards\compiler.py", line 8, in <module> from .files import get_input_output_paths, InputOutput File "e:\software\python 3.5\lib\site-packages\py_backwards\files.py", line 9, in <module> from .exceptions import InvalidInputOutput, InputDoesntExists File "e:\software\python 3.5\lib\site-packages\py_backwards\exceptions.py", line 1, in <module> from typing import Type, TYPE_CHECKING ImportError: cannot import name 'Type' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\MUA\AppData\Local\Temp\pip-install-mpmpuszp\pyppeteer\setup.py", line 25, in <module> from py_backwards.compiler import compile_files File "e:\software\python 3.5\lib\site-packages\py_backwards\compiler.py", line 8, in <module> from .files import get_input_output_paths, InputOutput File "e:\software\python 3.5\lib\site-packages\py_backwards\files.py", line 9, in <module> from .exceptions import InvalidInputOutput, InputDoesntExists File "e:\software\python 3.5\lib\site-packages\py_backwards\exceptions.py", line 1, in <module> from typing import Type, TYPE_CHECKING ImportError: cannot import name 'Type' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Here it is.
Try for python 3.8 64 bit install this 64-bit version and then try it. Upgrade your pip using (pip install --upgrade pip) then try for reinstall (pip install requests-html) almost your error should be cleared.
Hello, so i used this pip install requests-html
but i got the package but the version 0.0.1. After that i tried using pip install requests-html==0.10.0
but it gives me this error.
PS C:\Users\E.Lozada\PycharmProjects\CryptoRobot> pip install requests-html==0.10.0 Collecting requests-html==0.10.0 Using cached requests_html-0.10.0-py3-none-any.whl (13 kB) Collecting bs4 Using cached bs4-0.0.1.tar.gz (1.1 kB) Preparing metadata (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\e.lozada\pycharmprojects\cryptorobot\venv\scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\User s\E.Lozada\AppData\Local\Temp\pip-install-b6yf4ds\bs4_2fc2cb37473140aa9d79dd0f5df821bb\setup.py'"'"'; file='"'"'C:\Users\E.Lozada\AppData\Loc al\Temp\pip-install-b6yf4ds\bs4_2fc2cb37473140aa9d79dd0f5df821bb\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists( file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\E.Lozada\AppData\Local\Temp\pip-pip-egg-info-r5chv3nr' cwd: C:\Users\E.Lozada\AppData\Local\Temp\pip-install-b6yf4ds\bs4_2fc2cb37473140aa9d79dd0f5df821bb
Complete output (23 lines): Traceback (most recent call last): File "", line 1, in .py", line 782, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (pyparsing 3.0.6 (c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages), Requirement.parse('pypars ing<3,>=2.0.2'), {'packaging'})File "C:\Users\E.Lozada\AppData\Local\Temp\pip-install-b6yf4ds\bs4_2fc2cb37473140aa9d79dd0f5df821bb\setup.py", line 4, in setup( File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\setuptools_init .py", line 153, in setup return distutils.core.setup(**attrs) File "C:\Users\E.Lozada\AppData\Local\Programs\Python\Python310\lib\distutils\core.py", line 108, in setup setup_distribution = dist = klass(attrs) File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\setuptools\dist.py", line 453, in init Distribution.init( File "C:\Users\E.Lozada\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 292, in init self.finalize_options() File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\setuptools\dist.py", line 830, in finalize_options for ep in sorted(loaded, key=by_order): File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\setuptools\dist.py", line 829, inloaded = map(lambda e: e.load(), filtered) File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\pkg_resources_init .py", line 2463, in load self.require(*args, **kwargs) File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\pkg_resources_init.py", line 2486, in require items = working_set.resolve(reqs, env, installer, extras=self.extras) File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\pkg_resources_init
WARNING: Discarding https://files.pythonhosted.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz#sha256=36ecea 1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a (from https://pypi.org/simple/bs4/). Command errored out with exit status 1: python setup.py egg_i nfo Check the logs for full command output. Using cached bs4-0.0.0.tar.gz (1.1 kB) Preparing metadata (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\e.lozada\pycharmprojects\cryptorobot\venv\scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\User s\E.Lozada\AppData\Local\Temp\pip-install-b6yf4ds\bs4_4edbd5daf5dc4e879fb67bbd80ec8862\setup.py'"'"'; file='"'"'C:\Users\E.Lozada\AppData\Loc al\Temp\pip-install-b6yf4ds\bs4_4edbd5daf5dc4e879fb67bbd80ec8862\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists( file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\E.Lozada\AppData\Local\Temp\pip-pip-egg-info-pxog7o8k' cwd: C:\Users\E.Lozada\AppData\Local\Temp\pip-install-b6yf4ds\bs4_4edbd5daf5dc4e879fb67bbd80ec8862
Complete output (23 lines): Traceback (most recent call last): File "", line 1, in .py", line 782, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (pyparsing 3.0.6 (c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages), Requirement.parse('pypars ing<3,>=2.0.2'), {'packaging'})File "C:\Users\E.Lozada\AppData\Local\Temp\pip-install-b6yf4ds\bs4_4edbd5daf5dc4e879fb67bbd80ec8862\setup.py", line 4, in setup( File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\setuptools_init .py", line 153, in setup return distutils.core.setup(**attrs) File "C:\Users\E.Lozada\AppData\Local\Programs\Python\Python310\lib\distutils\core.py", line 108, in setup setup_distribution = dist = klass(attrs) File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\setuptools\dist.py", line 453, in init Distribution.init( File "C:\Users\E.Lozada\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 292, in init self.finalize_options() File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\setuptools\dist.py", line 830, in finalize_options for ep in sorted(loaded, key=by_order): File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\setuptools\dist.py", line 829, inloaded = map(lambda e: e.load(), filtered) File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\pkg_resources_init .py", line 2463, in load self.require(*args, **kwargs) File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\pkg_resources_init.py", line 2486, in require items = working_set.resolve(reqs, env, installer, extras=self.extras) File "c:\users\e.lozada\pycharmprojects\cryptorobot\venv\lib\site-packages\pkg_resources_init
WARNING: Discarding https://files.pythonhosted.org/packages/50/fe/c4bf5083af20ec85ac5d278dfd12a9756724100c308b7bdccbaa7cbf5715/bs4-0.0.0.tar.gz#sha256=28408e bf82f66e2cf1e2a484c62f6e5d901fd6bdf1d9a6787207599538f0dbe6 (from https://pypi.org/simple/bs4/). Command errored out with exit status 1: python setup.py egg_i nfo Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement bs4 (from requests-html) (from versions: 0.0.0, 0.0.1) ERROR: No matching distribution found for bs4
Any idea how can i fix this?
Try pip install html5 HTML5 is the latest version of HTML and supports new markup language functionalities such as multimedia, new tags and elements as well as new APIs