Error in bench installation

sudo pip3 install -e /home/sammy/.bench

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python develop did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Traceback (most recent call last):
File “”, line 2, in
File “”, line 14, in
File “/usr/local/lib/python3.10/dist-packages/setuptools/”, line 20, in
from setuptools.dist import Distribution, Feature
File “/usr/local/lib/python3.10/dist-packages/setuptools/”, line 35, in
from setuptools.depends import Require
File “/usr/local/lib/python3.10/dist-packages/setuptools/”, line 7, in
from .py33compat import Bytecode
File “/usr/local/lib/python3.10/dist-packages/setuptools/”, line 55, in
unescape = getattr(html, ‘unescape’, html_parser.HTMLParser().unescape)
AttributeError: ‘HTMLParser’ object has no attribute ‘unescape’

Please try.

pip3 install --upgrade setuptools
pip3 install --upgrade pip
pip3 install --upgrade distlib


Thank you so much. I tried but getting same error, any other way to resolve it?


Reported here for the python3.9 compatibility issue. fix: Use html.unescape for Python 3.9 compatibility. by tirkarthi · Pull Request #12005 · frappe/frappe · GitHub

Maybe you have to downgrade 3.10 to 3.9.

Thank you.