Results 1 to 4 of 4

Thread: Trying to install PyQt on Mac

  1. #1
    Join Date
    Mar 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Trying to install PyQt on Mac

    Okay Ive followed some reliable instructions on how to install the latest QT build for OSX and sip 4.13 but not having much luck with PyQt 4.8.6.
    After running 'python configure.py' from terminal i get this error...

    'Error: Make sure you have a working Qt v4 qmake on your PATH or use the -q argument to explicitly specify a working Qt v4 qmake.'

    I did some searching and tried this on...

    'PATH=$PATH:/Users/jeremyraven/QtSDK/Simulator/Qt/gcc/bin/qmake
    export PATH'

    But I still got the above error so I ran this command...

    'python configure.py -q /Users/jeremyraven/QtSDK/Simulator/Qt/gcc/bin/qmake'

    and now I get this...

    'Error: Qt has been built as static libraries so either the -g or -k argument
    should be used.'

    and now im stuck. Any help would be great thanks.


    Added after 51 minutes:


    This seems to be working...

    'python configure.py -g -q /Users/jeremyraven/QtSDK/Simulator/Qt/gcc/bin/qmake'


    Added after 18 minutes:


    Okay after the PyQt install I got these errors...are they important, should I fix them? If so how to go about it?

    '/Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp: In function ‘PyObject* func_qt_mac_set_press_and_hold_context(PyObject*, PyObject*)’:
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp:6886: error: ‘qt_mac_set_press_and_hold_context’ was not declared in this scope
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp: In function ‘PyObject* func_qt_mac_set_native_menubar(PyObject*, PyObject*)’:
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp:6914: error: ‘qt_mac_set_native_menubar’ was not declared in this scope
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp: In function ‘PyObject* func_qt_mac_set_menubar_merge(PyObject*, PyObject*)’:
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp:6942: error: ‘qt_mac_set_menubar_merge’ was not declared in this scope
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp: In function ‘PyObject* func_qt_mac_set_menubar_icons(PyObject*, PyObject*)’:
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp:6970: error: ‘qt_mac_set_menubar_icons’ was not declared in this scope
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp: In function ‘PyObject* func_qt_mac_set_dock_menu(PyObject*, PyObject*)’:
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp:6999: error: ‘qt_mac_set_dock_menu’ was not declared in this scope
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp: In function ‘PyObject* func_qt_mac_secure_keyboard(PyObject*, PyObject*)’:
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp:7029: error: ‘qt_mac_secure_keyboard’ was not declared in this scope
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp: In function ‘PyObject* func_qt_set_sequence_auto_mnemonic(PyObject*, PyObject*)’:
    /Users/jeremyraven/PyQt-mac-gpl-4.8.6/_qt/sipQtGuicmodule.cpp:7057: error: ‘qt_set_sequence_auto_mnemonic’ was not declared in this scope
    make[1]: *** [sipQtGuicmodule.o] Error 1
    make: *** [install] Error 2'
    Last edited by Aikiman; 2nd March 2012 at 10:26.

  2. #2
    Join Date
    Mar 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Trying to install PyQt on Mac

    Now if I try and run a file in terminal like 'python myWindow.py' I get this...

    'ImportError: No module named PyQt4'

    I read this means PyQt was not installed properly well blow me down!


    Added after 49 minutes:


    Inside my python directory I have Python_2.6/Share/sip/PyQt4/...

    To me this appears that I do have the module PyQt4 however if I run help('modules') they dont appear of the list. wtf
    Last edited by Aikiman; 2nd March 2012 at 12:38.

  3. #3
    Join Date
    May 2012
    Location
    Sudbury, MA (Boston)
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Trying to install PyQt on Mac

    I was getting ‘qt_set_sequence_auto_mnemonic’ was not declared in this scope.

    When I went back and got the PyQt to match my Qt SDK I did much better. Run Qt Creator, do About... then google
    PyQt-mac-gpl-4.7.3.tar.gz - as I write this www.riverbankcomputing.co.uk is down, but, I found "the right" version on some other python download page. I got further:


    /Users/jch/Downloads/PyQt-mac-gpl-4.7.4/sip/QtCore/qobject.sip:558: error: invalid conversion from ‘const QObject*’ to ‘QObject*’
    make[1]: *** [sipQtCoreQObject.o] Error 1
    make: *** [all] Error 2

    - so before I went on, I thought I'd leave a breadcrumb... If I wind up down a dark alley... send a search party.

  4. #4
    Join Date
    May 2012
    Location
    Sudbury, MA (Boston)
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Trying to install PyQt on Mac

    I was thinking that if the error was in sip/QtCore/qobject.sip and switching to version 4.7.4 of sip might help. It did not. I tried 3 other versions of sip and none did as well as 4.13.2 ( lots of old versions here: http://distfiles.macports.org/python/ )

    The error I am getting smells like version skew:


    g++ -c -pipe -fPIC -O2 -Wall -W -DNDEBUG -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_WEBKIT_LIB -DQT_TEST_LIB -DQT_SQL_LIB -DQT_SCRIPTTOOLS_LIB -DQT_SCRIPT_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/Users/jch/Downloads/PyQt-mac-gpl-4.7.4/qpy/QtCore -I/Users/jch/Downloads/PyQt-mac-gpl-4.7.4/qpy/QtGui -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/mkspecs/default -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/phonon.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtXmlPatterns.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtXml.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtWebKit.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtTest.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtSvg.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtSql.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtScriptTools.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtScript.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtOpenGL.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtNetwork.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtMultimedia.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtGui.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib/QtCore.framework/Headers -I/Users/jch/QtSDK/Desktop/Qt/474/gcc/include -F/Users/jch/Downloads/PyQt-mac-gpl-4.7.4/qpy/QtCore -F/Users/jch/Downloads/PyQt-mac-gpl-4.7.4/qpy/QtGui -F/Users/jch/QtSDK/Desktop/Qt/474/gcc/lib -o sipQtCoreQObject.o sipQtCoreQObject.cpp
    /Users/jch/Downloads/PyQt-mac-gpl-4.7.4/sip/QtCore/qobject.sip: In function ‘PyObject* meth_QObject_emit(PyObject*, PyObject*)’:
    /Users/jch/Downloads/PyQt-mac-gpl-4.7.4/sip/QtCore/qobject.sip:467: error: invalid conversion from ‘const QObject*’ to ‘QObject*’
    /Users/jch/Downloads/PyQt-mac-gpl-4.7.4/sip/QtCore/qobject.sip:467: error: initializing argument 1 of ‘bool qpycore_qobject_emit(QObject*, const char*, PyObject*)’
    /Users/jch/Downloads/PyQt-mac-gpl-4.7.4/sip/QtCore/qobject.sip: In function ‘PyObject* meth_QObject_receivers(PyObject*, PyObject*)’:
    /Users/jch/Downloads/PyQt-mac-gpl-4.7.4/sip/QtCore/qobject.sip:558: error: invalid conversion from ‘const QObject*’ to ‘QObject*’
    make[1]: *** [sipQtCoreQObject.o] Error 1
    make: *** [all] Error 2

Similar Threads

  1. Replies: 0
    Last Post: 17th November 2011, 13:35
  2. Replies: 6
    Last Post: 13th March 2011, 23:49
  3. Upgrading from PyQt 4.5 to PyQt 4.7
    By RogerCon in forum Installation and Deployment
    Replies: 0
    Last Post: 14th July 2010, 18:52
  4. How install fonts with make install
    By jiveaxe in forum Qt Programming
    Replies: 1
    Last Post: 2nd January 2008, 19:38
  5. "make install" doesn't install binary
    By jiveaxe in forum Newbie
    Replies: 2
    Last Post: 2nd January 2008, 12:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.