0

I tried to run pip install on a local package for PyMeenus, and encountered below error. I'm on Python 3.9.

Anyone knows how I can overcome this? Thanks.

(base) test@test-c161616e-0:/notebooks/pypi_envs$ pip install PyMeeus-0.5.11.tar.gz 

Processing ./PyMeeus-0.5.11.tar.gz ERROR: Command errored out with exit status 1: command: /opt/conda/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-m2fwwivg/setup.py'"'"'; file='"'"'/tmp/pip-req-build-m2fwwivg/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 /tmp/pip-pip-egg-info-98jdihbo cwd: /tmp/pip-req-build-m2fwwivg/ Complete output (11 lines): Traceback (most recent call last): File "", line 1, in File "/opt/conda/lib/python3.9/site-packages/setuptools/init.py", line 20, in from setuptools.dist import Distribution, Feature File "/opt/conda/lib/python3.9/site-packages/setuptools/dist.py", line 35, in from setuptools.depends import Require File "/opt/conda/lib/python3.9/site-packages/setuptools/depends.py", line 7, in from .py33compat import Bytecode File "/opt/conda/lib/python3.9/site-packages/setuptools/py33compat.py", line 55, in unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape) AttributeError: 'HTMLParser' object has no attribute 'unescape' ---------------------------------------- WARNING: Discarding file:///notebooks/pypi_envs/PyMeeus-0.5.11.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)'))) - skipping

nuttychan
  • 21
  • 4
  • https://stackoverflow.com/search?q=%5Bpip%5D+AttributeError%3A+HTMLParser+object+has+no+attribute+unescape – phd Nov 23 '22 at 09:20
  • The error seems to be a bug in `setuptools`. Try to upgrade `setuptools`. Or use Python 3.8. – phd Nov 23 '22 at 09:20

0 Answers0