Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation With Python >=3.9 Fails ('HTMLParser' object has no attribute 'unescape') #980

Closed
b0ssi opened this issue Dec 14, 2020 · 3 comments · Fixed by #1006
Closed
Labels

Comments

@b0ssi
Copy link

b0ssi commented Dec 14, 2020

Rez version

2.69.6

Platform and Operating System

  • Python-3.9
  • Arch Linux

Contextual Information

I'm attempting to install rez.

Simplest possible steps to reproduce.

Using an environment with Python >=3.9 installed, attempt a manual install:

$ tar -xazvf 2.69.6.tar.gz
$ cd rez-2.69.6
$ python ./install.py

Expected Result

Successful installation

Actual Result

Installation fails with the following:

ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/opt/rez/lib/python3.9/site-packages/setuptools/__init__.py", line 20, in <module>
        from setuptools.dist import Distribution, Feature
    File "/opt/rez/lib/python3.9/site-packages/setuptools/dist.py", line 34, in <module>
        from setuptools.depends import Require
    File "/opt/rez/lib/python3.9/site-packages/setuptools/depends.py", line 7, in <module>
        from .py33compat import Bytecode
    File "/opt/rez/lib/python3.9/site-packages/setuptools/py33compat.py", line 55, in <module>
        unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape)
AttributeError: 'HTMLParser' object has no attribute 'unescape'
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-w0ivy6a5/
WARNING: You are using pip version 19.1.1, however version 20.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[...]

The reason seems to be rez being bundled with setuptools-41.0.1-py2.py3-none-any (and pip-19.1.1), which is now incompatible with Python-3.9 (and above), as HTMLParser.unescape got removed in Python-3.9.

@b0ssi b0ssi changed the title Installation With Python >=3.9 Fails ('HTMLParser' object has no attribute 'unescape') Installation With Python >=3.9 Fails ('HTMLParser' object has no attribute 'unescape') Dec 14, 2020
@nerdvegas
Copy link
Contributor

I highly suspect that the best fix for this will be #982

@b0ssi
Copy link
Author

b0ssi commented Dec 15, 2020

That sounds like it should fix the issue, if it's instead using the local venv environment that corresponds with the Python installation that gets picked up.

@b0ssi
Copy link
Author

b0ssi commented Mar 12, 2021

This has been working for a while now since, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants