Question

When I try to launch an app made with pyramid, I get the error

    from pyramid.compat import configparser
File "/srv/lightbase/lib/python3.3/site-packages/pyramid-1.5b1-py3.3.egg/pyramid/compat.py", line 205, in <module>
    from html import escape
ImportError: cannot import name escape

When trying to pip install html, I get the error:

ImportError: No module named 'html.entities'; html is not a package

Im using a virtualenv with python3.3.4 that was compiled from code using '--enable-shared' for mod_wsgi use.

Was it helpful?

Solution

The version of python I used was compiled from most recent code release, and I was using mod_wsgi pre-compiled from debian 6 default repository, removing it and compiling my own mod_wsgi with most recent version was enough to fix the problem. I think that means they where not compatible.

Since pip install html/easy_install html didn't work, symlinking /usr/local/python3.3/html to the virtualenv site-packages folder made the interpreter read it as a package. This may not be the greatest solution, but I'll make it the correct answer until a better option comes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top