Setuptools: no module named 'html.entities'

Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de
Mon Mar 16 09:10:09 EDT 2015


On 03/16/2015 12:53 AM, Jason Friedman wrote:
> Hello,
>
> This is Python 3.3.2 on Linux.
> I downloaded Setuptools
> (https://pypi.python.org/packages/source/s/setuptools/setuptools-14.3.tar.gz),
> exploded the tarball, and I get:
>
> python setup.py build
> Traceback (most recent call last):
>    File "<frozen importlib._bootstrap>", line 1521, in
> _find_and_load_unlocked
> AttributeError: 'module' object has no attribute '__path__'
>
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
>    File "setup.py", line 21, in <module>
>      exec(init_file.read(), command_ns)
>    File "<string>", line 11, in <module>
>    File "/home/spjsf/setuptools-14.3/setuptools/__init__.py", line 11,
> in <module>
>      from setuptools.extension import Extension
>    File "/home/spjsf/setuptools-14.3/setuptools/extension.py", line 8,
> in <module>
>      from .dist import _get_unpatched
>    File "/home/spjsf/setuptools-14.3/setuptools/dist.py", line 16, in
> <module>
>      from setuptools.depends import Require
>    File "/home/spjsf/setuptools-14.3/setuptools/depends.py", line 6, in
> <module>
>      from setuptools import compat
>    File "/home/spjsf/setuptools-14.3/setuptools/compat.py", line 44, in
> <module>
>      from html.entities import name2codepoint
> ImportError: No module named 'html.entities'; html is not a package
>
>

Not sure, but maybe you have a html.py somewhere in your module search 
path taking precedence over the stdlib html package ?
Putting a dummy html.py file into the extracted setuptools folder, at 
least, lets me reproduce your exact error.

What does

python -c "import html; print(html)"

tell you ?

Best,
Wolfgang




More information about the Python-list mailing list