import module doesn't work for new package

Discussion in 'Python' started by goldtech, Dec 3, 2010.

  1. goldtech

    goldtech Guest

    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

    giga1@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
    goldtech, Dec 3, 2010
    #1
    1. Advertising

  2. On Fri, 03 Dec 2010 12:27:04 -0800, 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


    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.


    --
    Steven
    Steven D'Aprano, Dec 4, 2010
    #2
    1. Advertising

  3. On Fri, 3 Dec 2010 12:27:04 -0800 (PST), goldtech
    <> declaimed the following in
    gmane.comp.python.general:

    > 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?
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Dec 4, 2010
    #3
  4. goldtech

    Peter Otten Guest

    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@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.
    Peter Otten, Dec 4, 2010
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page