import module doesn't work for new package

Peter Otten __peter__ at web.de
Sat Dec 4 05:36:03 EST 2010


goldtech wrote:

> I tried install a Python - would the word be "package"? - on Ubuntu
> 10.10. Could you tell me how to fix? I would be grateful, is it a path
> problem? Thanks. Lee

If you are talking about http://paul.giannaros.org/pykhtml/ , this package 
requires kde3 while you are /probably/ running kde4.

> giga1 at giga1:~/Desktop/pykhtml-0.2$ sudo python setup.py install
> [sudo] password for giga1:
> running install
> running build
> running build_py
> creating build
> creating build/lib.linux-i686-2.6
> creating build/lib.linux-i686-2.6/pykhtml
> copying pykhtml/dom.py -> build/lib.linux-i686-2.6/pykhtml
> copying pykhtml/__init__.py -> build/lib.linux-i686-2.6/pykhtml
> running install_lib
> running install_egg_info
> Removing /usr/local/lib/python2.6/dist-packages/PyKHTML-0.2.egg-info
> Writing /usr/local/lib/python2.6/dist-packages/PyKHTML-0.2.egg-info
> 
> then:
> 
>>>> import pykhtml
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "pykhtml/__init__.py", line 3, in <module>
>     import khtml, kdecore, kdeui, kio, dcopext
> ImportError: No module named khtml

This would become

from PyKDE4 import khtml, kdecore, kdeui, kio

in KDE4, but there are /probably/ API changes. DCOP which is /probably/ what 
dcopext provides has been replaced with dbus.

Given these changes and the fact that pykhtml development has stopped in 
early 2008 you'd /probably/ have to put in a lot of effort to make it work 
with your current desktop environment.



More information about the Python-list mailing list