1

I am running Python 3.4

Did pip install json2html with no errors.

However, when I execute "import json2html" I got:

>>> import json2html
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python34\lib\site-packages\json2html-0.3-py3.4.egg\json2html\__init__.py", line 6, in <module>
ImportError: No module named 'jsonconv'
>>>

please help suggest..

4

1 回答 1

0

It seems this library is not python3-compatible.

Error was caused by this line in the __init__.py file:

from jsonconv import *

While, instead, it should be:

from .jsonconv import *

Try this fork instead: https://github.com/YAmikep/json2html

于 2015-11-27T19:06:46.977 回答