aaronsw / html2text

Convert HTML to Markdown-formatted text.
http://www.aaronsw.com/2002/html2text/
GNU General Public License v3.0
2.63k stars 414 forks source link

python2.7 ImportError: No module named entities #120

Open l123456789jy opened 4 years ago

l123456789jy commented 4 years ago

pip install html2text

Looking in indexes: https://mirrors.aliyun.com/pypi/simple Collecting html2text Downloading https://mirrors.aliyun.com/pypi/packages/81/41/0aba42dac6d0ffe0a721f7fe353acc70a4cf284facdb8763f4591961dd0b/html2text-2019.9.26.tar.gz (48kB) |████████████████████████████████| 51kB 18.1MB/s ERROR: Command errored out with exit status 1: command: /bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g4Ldjw/html2text/setup.py'"'"'; file='"'"'/tmp/pip-install-g4Ldjw/html2text/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-g4Ldjw/html2text/pip-egg-info cwd: /tmp/pip-install-g4Ldjw/html2text/ Complete output (7 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-g4Ldjw/html2text/setup.py", line 11, in version=".".join(map(str, import("html2text").version)), File "html2text/init.py", line 3, in import html.entities ImportError: No module named entities

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

liamengland1 commented 4 years ago

https://github.com/aaronsw/html2text/issues/116#issuecomment-412264562