import module doesn't work for new package


G

goldtech

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

[email protected]:~/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:
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
 
Ad

Advertisements

S

Steven D'Aprano

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

That looks to me like either a missing dependency, or a bug in the
package.

It could be that package pykhtml depends on another package khtml, which
isn't installed, or it could simply be a bug in pykhtml.

It might help if you look at the MANIFEST file that came with the pykhtml
package, and see what files it lists.
 
D

Dennis Lee Bieber

import khtml, kdecore, kdeui, kio, dcopext
ImportError: No module named khtml

Given those names this package is targeted for use with the KDE
windowing system... Is that what you are running?
 
Ad

Advertisements

P

Peter Otten

goldtech said:
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.
[email protected]:~/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:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top