Difficulty getting PyQt 4.4.4 installed on Ubuntu

Showing 1-7 of 7 messages
Difficulty getting PyQt 4.4.4 installed on Ubuntu Bill Price 12/24/08 5:39 PM
Hello,

I've been trying to get everything set up as required to do some
development work. I've hit an odd problem, though. When I try to set
up PyQt 4.4.4, this is what happens:

/////

bill@bill-desktop:~/Desktop/PyQt-x11-gpl-4.4.4$ python configure.py
Traceback (most recent call last):
  File "configure.py", line 43, in <module>
    import sipconfig
ImportError: No module named sipconfig

/////

I tried googling the ImportError message, and the solution given is
this: "install package python- sip4-dev". However, I do have the sip4
and the python-sip4-dev packages installed already via the Synaptic
Package Manager included with Ubuntu.

I am not sure what other information might be helpful, but any
assistance would be greatly appreciated. :)



One other note: I did find PyQt via the package manager, but the
version listed is "4.3.3-2ubuntu4.1" which I assume means it's version
4.3.3, not 4.4+.
Re: Difficulty getting PyQt 4.4.4 installed on Ubuntu Bill Price 12/24/08 5:54 PM
As an update to my earlier message: I decided to try using the version
of PyQt available through the package repository, and perhaps as a
result of that, I have encountered an error when building the program.

Here is what I saw in my terminal:

/////

bill@bill-desktop:~/mnemosyne-proj/mnemosyne$ make setup
virtualenv .
New python executable in ./bin/python2.5
Also creating executable in ./bin/python
Installing setuptools............done.

bill@bill-desktop:~/mnemosyne-proj/mnemosyne$ make
cd mnemosyne/pyqt_ui ; make clean
make[1]: Entering directory `/home/bill/mnemosyne-proj/mnemosyne/
mnemosyne/pyqt_ui'
rm -f *~ *.pyc
rm -f ui_main_window.py ui_add_cards_dlg.py ui_review_wdgt.py
ui_preview_cards_dlg.py
make[1]: Leaving directory `/home/bill/mnemosyne-proj/mnemosyne/
mnemosyne/pyqt_ui'
cd mnemosyne/pyqt_ui ; make
make[1]: Entering directory `/home/bill/mnemosyne-proj/mnemosyne/
mnemosyne/pyqt_ui'
pyuic4 main_window.ui > ui_main_window.py
/bin/sh: pyuic4: not found
make[1]: *** [ui_main_window.py] Error 127
make[1]: Leaving directory `/home/bill/mnemosyne-proj/mnemosyne/
mnemosyne/pyqt_ui'
make: *** [install-and-run-virtual-env] Error 2

bill@bill-desktop:~/mnemosyne-proj/mnemosyne$

/////

Especially considering that the error appears to have been "/bin/sh:
pyuic4: not found", I am assuming it is indeed a problem with having
PyQt version 4.3.3 rather than 4.4.4 installed. I feel very close to
having everything set up properly, but I am unsure how to get the
4.4.4 installation to work correctly-- I would be very grateful for
any suggestions or assistance. :)

Best,
Bill
Re: Difficulty getting PyQt 4.4.4 installed on Ubuntu Bill Price 12/24/08 6:29 PM
Sorry for all of the updates! With a lot of experimentation, I have
made some progress, but I am still encountering the same error.

I installed g++ from the package repository and then built the
following from source, to replace the older versions I had gotten from
the package repository:

sip-4.7.9
PyQt-x11-gpl-4.4.4

However, I still get the same error when I try to make Mnemosyne.
Relevant part quoted again below:

/////

/bin/sh: pyuic4: not found
make[1]: *** [ui_main_window.py] Error 127
make[1]: Leaving directory `/home/bill/mnemosyne-proj/mnemosyne/
mnemosyne/pyqt_ui'
make: *** [install-and-run-virtual-env] Error 2

/////

Maybe there is some kind of PATH issue? I am still very much a
beginner with Unix-based operating systems, so I am not sure what else
to try. :)

Sorry again for so many messages!
Re: Difficulty getting PyQt 4.4.4 installed on Ubuntu Bill Price 12/24/08 7:57 PM
Yet another update: I redid "make" and "sudo make install" on the PyQt-
x11-gpl-4.4.4 I had downloaded, and now, this is the only error that I
get when I try to run the "make" command on mnemosyne:

/////

ImportError: cannot import name QtWebKit
make: *** [install-and-run-virtual-env] Error 1

/////

I found one mention online that "4.4.0 [is] the first release that
includes webkit," but like I said, I was installing 4.4.4, so I would
think webkit would have installed correctly along with the other
features?

Here is an excerpt from pyctconfig.py.in, in which the phrase "webkit"
is visible:

/////

class QtWebKitModuleMakefile(QtNetworkModuleMakefile):
    """The Makefile class for modules that %Import QtWebKit.
    """
    def __init__(self, *args, **kw):
        """Initialise an instance of a module Makefile.
        """
        if not kw.has_key("qt"):
            kw["qt"] = ["QtCore", "QtGui", "QtNetwork", "QtWebKit"]

        QtNetworkModuleMakefile.__init__(self, *args, **kw)

/////

However, there is no mention of "webkit" anywhere inside of the
makefile.

Again, I have very little idea of how this all works, so I am just
trying to relay what information I have that seems relevant. :)
Re: Difficulty getting PyQt 4.4.4 installed on Ubuntu Bill Price 12/25/08 8:56 PM
Here's an update, just to say what I've been thinking...

I had installed Qt from the Synaptic Package Manager, but I realized
it was version 4.3.4. So right now, I'm compiling "qt-x11-opensource-
src-4.4.3". I have been compiling it for a few hours, and I'm not sure
how much longer it will take-- but one way or another, I need to go to
bed soon. :)

My plans are as follows:

- Finish compiling and installing Qt 4.4.3
- Re-compile and re-install PyQt
- Test compiling Mnemosyne again

Hopefully this resolves the current issue, but I will not know until
the compilation is done. I will be making a new thread to ask a
different question in the meantime.
Re: Difficulty getting PyQt 4.4.4 installed on Ubuntu Bill Price 12/25/08 9:23 PM
Update: Installing Qt 4.4.3 followed by PyQt 4.4.4 did not fix the
"cannot import name QtWebKit" error.
Re: [mnemosyne-proj-devel] Re: Difficulty getting PyQt 4.4.4 installed on Ubuntu Peter Bienstman 12/26/08 1:34 AM
On Ubuntu, there is no need to compile anything by hand, but you do need to
install some extra development packages:

sudo apt-get install python-qt4-dev python-sip4  python-sip4-dev

There might be others, but if you send me the next errors you receive, I can
pinpoint you in the right direction and update the instructions on the webpage
further.

Also try to make sure that you remove all the tools you compiled manually, as
they could interfere.

Hope this helps,

Peter