pip3 on python3.9 fails on ‘HTMLParser’ object has no attribute ‘unescape’ [duplicate]

After some trial and error I upgraded, pip, distlib and setuptools and it solved it. Not sure which of those is causing it. (On the last two I found issues 1 2 of other sites)
It is caused by removing unescape from HTMLParser in python3.9, which seems to break setuptools.

pip3 install --upgrade setuptools

If it does not work, try also:

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

Note from @seb comment: The default pip3 may not be the python you are using. If so, try pip of your specific version used (e.g. pip3.9)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)