installing PyQt

Discussion in 'Python' started by Michael Mossey, Sep 3, 2003.

  1. Hi, I'm trying to install PyQt for windows together with
    non-commercial Qt version 2.3.0. When I try to run a sample Qt
    program I get this error:

    File "c:/DOCUME~1/mossey/LOCALS~1/Temp/python-1872fAk", line 1, in ?
    from main_qt import *
    File "main_qt.py", line 2, in ?
    from qt import *
    File "C:\PROGRA~1\Python22\lib\site-packages\qt.py", line 17, in ?
    import libsip
    ImportError: DLL load failed: The specified module could not be found.

    I'm assuming it can't find libsip.dll. This file is located in the
    directory C:\Program Files\Python22\Lib\site-packages\ and I added
    that directory to both the PYTHONPATH and the PATH. This is windows
    2000 so I used the system dialog to do it, and then rebooted the
    computer (I don't know if rebooting is necessary). I keep getting the
    same error. I tried copying libsip.dll to the C:\winnt directory and
    it still didn't find it. Can someone familiar with Python on Windows
    2000 give me a clue here?

    Regards,
    Mike
    Michael Mossey, Sep 3, 2003
    #1
    1. Advertising

  2. David Bolen <> wrote in message news:<>...
    > (Michael Mossey) writes:
    >
    > > Hi, I'm trying to install PyQt for windows together with
    > > non-commercial Qt version 2.3.0. When I try to run a sample Qt
    > > program I get this error:
    > >
    > > File "c:/DOCUME~1/mossey/LOCALS~1/Temp/python-1872fAk", line 1, in ?
    > > from main_qt import *
    > > File "main_qt.py", line 2, in ?
    > > from qt import *
    > > File "C:\PROGRA~1\Python22\lib\site-packages\qt.py", line 17, in ?
    > > import libsip
    > > ImportError: DLL load failed: The specified module could not be found.
    > >
    > > I'm assuming it can't find libsip.dll. This file is located in the
    > > directory C:\Program Files\Python22\Lib\site-packages\ and I added
    > > that directory to both the PYTHONPATH and the PATH. This is windows
    > > 2000 so I used the system dialog to do it, and then rebooted the
    > > computer (I don't know if rebooting is necessary). I keep getting the
    > > same error. I tried copying libsip.dll to the C:\winnt directory and
    > > it still didn't find it. Can someone familiar with Python on Windows
    > > 2000 give me a clue here?

    >
    > It's hard to believe that it won't find libsip.dll if it's in the
    > site-packages directory since that's part of your default Python
    > search path (even without a PYTHONPATH setting). And since libsip is
    > a direct "import" (and not a system DLL dependency), the search path
    > that governs things is Pythons (e.g., sys.path, including PYTHONPATH)
    > and not the Windows system search path (aka PATH).
    >
    > But it wouldn't hurt for you to verify sys.path after starting a copy
    > of Python just to ensure that it has all the directories you expect.
    >
    > So if we assume libsip itself is found, the problem could be in
    > loading it due to another dependency. Do you have the underlying Qt
    > DLL (I forget the exact name for the non-commercial version) also
    > somewhere in the system PATH? libsip.dll depends on the Qt DLL, and
    > if it fails to find it, libsip in turn will fail to load and can
    > produce precisely the traceback as above.
    >
    > Although if it is a failing dependent DLL, in such a case typically
    > you'll also get a system dialog complaining about not finding the
    > underlying dependent DLL, but maybe you've just answered that dialog
    > without reading it closely? (or maybe somehow those dialogs are being
    > suppressed in your setup)
    >
    > Another alternative would be some other dependency - it might be worth
    > checking if all the dependencies for libsip.dll can be resolved on
    > your system. A tool like depends (comes with various MS
    > toolkits/development environments), or cygcheck (if you have cygwin)
    > or others you can download can check this.
    >
    > -- David



    Hi, thanks very much. Your information was helpful in tracking down
    the problem, which turned out to be that PyQt was built against Python
    2.3 and I was running Python 2.2.2. I'm running Python from Emacs, so
    I had to do a few more things to get Emacs to recognize a new version
    of python -- turns out I had to re-byte-compile the python-mode.el
    file. It all seems to work now. Although you didn't suggest this
    solution directly, your information allowed me to eliminate things and
    quickly move toward the right answer. Isn't it neat how that works?

    -Mike
    Michael Mossey, Sep 4, 2003
    #2
    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.
Similar Threads
  1. Lupe
    Replies:
    3
    Views:
    310
    Lawrence Oluyede
    Aug 27, 2003
  2. ulysses
    Replies:
    4
    Views:
    764
    Werner Schiendl
    Oct 22, 2003
  3. Replies:
    10
    Views:
    544
    Svenn Are Bjerkem
    Nov 13, 2004
  4. Replies:
    2
    Views:
    362
    Giovanni Bajo
    Jan 24, 2007
  5. Marcus Strube

    Installing PyQt

    Marcus Strube, Feb 6, 2008, in forum: Python
    Replies:
    1
    Views:
    338
    Diez B. Roggisch
    Feb 6, 2008
Loading...

Share This Page