Results 1 to 3 of 3
Discuss PyQt4 on OSX at the Genuine Mac Support - Hackint0sh.org; Yes, yet another install PyQt4 on Mac thread to clutter up the internet... Hoping someone ...
  1. #1
    Supporter Array Rooster212's Avatar

    Join Date
    Aug 2008
    Location
    Cambridge, England
    Posts
    116
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    11

    Question PyQt4 on OSX

    Yes, yet another install PyQt4 on Mac thread to clutter up the internet...

    Hoping someone could give me a heads up on installing PyQt4 on OSX 10.6.6, I have tried EVERYTHING and booting into a VM isn't nice every time i want to do a bit of programming with Python 3 for my coursework!

    Basically, to install it i have followed instructions all over the internet to get this working but i have recently had a new teacher come and teach me computing at college and he is a Mac user (win) and he managed to get it installed and gave me these instructions:

    Code:
    Installing PyQt4 on Mac OS X 10.6:
    
    1. Make sure you have the latest Mac OS X Update installed (10.6.6) 
    2. Download and install the most recent Python installation from http://www.python.org/download/releases/3.1.3/ 
    3. Open Terminal and type the following to make sure Python launches as a 32-bit process): 
    defaults write com.apple.versioner.python3 Prefer-32-Bit -bool yes 
    4. Download the Cocoa Mac binary package for Qt from http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x
    
    5. Run the Qt installer and wait for it to finish 
    6. Download the development snapshot of SIP from http://www.riverbankcomputing.co.uk/software/sip/download 
    7. Download the development snapshot of PyQt from http://www.riverbankcomputing.co.uk/software/pyqt/download 
    8. Create a new folder called 'OpenSource' inside your user directory
    9. Move the SIP and PyQt tar.gz packages to this folder 
    10. Double-click on the SIP and PyQt tar.qz to decompress them 
    11. Rename the SIP and PyQt folders something shorter e.g. 'SIP' and 'PyQt' 
    
    12. In Terminal type the following to install SIP (each line separately followed by enter): 
    cd ~/OpenSource 
    cd SIP 
    python3 configure.py -d /Library/Python/3.1/site-packages --arch i386 
    make 
    sudo make install
    
    13. In Terminal type the following to install PyQt4 (each line separately followed by enter): 
    cd ..
    cd PyQt 
    python3 configure.py -d /Library/Python/3.1/site-packages/ --use-arch i386 
    make 
    sudo make install
    I am familiar with the terminal so understand all the commands... the error message i am getting is at step 13 (which is REALLY ANNOYING) which after the line
    Code:
    python3 configure.py -d /Library/Python/3.1/site-packages/ --use-arch i386
    i get an error saying:
    Code:
    "Error: This version of PyQt requires SIP version v4.12.1 or later"
    Version of SIP i installed was 4.12.1, version of Python i have installed is 3.1.3 (version required for SIP v4.12.1) version of PyQt4 is 4.8.3 is the one i am trying to install.

    Can anyone help? Its really annoying me! I am kind of resigned to the fact that i might have to keep booting into a VM though, so if no-one can... thanks for trying if you do
    Phone: iPhone 4S 32GB iOS 5.1.1 Jailbroken
    Mac: MacBook Pro 15" Core i5 @ 2.4GHz, 4GB RAM, 10.7.4
    Custom Build: Corsair 650D, Gigabyte GA-Z68X-UD4-B3, Intel i5 2500K @ 4.4GHz, 8GB RAM @ 1866Mhz, Corsair H70 watercooler



  2. #2
    Supporter Array Rooster212's Avatar

    Join Date
    Aug 2008
    Location
    Cambridge, England
    Posts
    116
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    11

    Default

    Ok well i have a different error message... I removed all traces of Python 3.1.3, Qt and SIP from OSX and did the same steps as before.

    Now I'm getting an error message along the lines of "Error: cannot determine layout of your Qt installation" so i'll try some other stuff out and see how far i get!
    Phone: iPhone 4S 32GB iOS 5.1.1 Jailbroken
    Mac: MacBook Pro 15" Core i5 @ 2.4GHz, 4GB RAM, 10.7.4
    Custom Build: Corsair 650D, Gigabyte GA-Z68X-UD4-B3, Intel i5 2500K @ 4.4GHz, 8GB RAM @ 1866Mhz, Corsair H70 watercooler

  3. #3
    Supporter Array Rooster212's Avatar

    Join Date
    Aug 2008
    Location
    Cambridge, England
    Posts
    116
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    11

    Default

    Ok, PyQt is getting closer to working...

    I wiped all traces of Python 3.1.3, SIP and Qt and reinstalled from the beginning... Managed to get to the point of making it recognising my SIP installation, but now it is giving me another funky error message which goes along the lines of saying it doesn't know where Qt is... searching on the internet reveals you have to link the qmake file to the installation of PyQt using a command like:

    Code:
    python3 configure.py -q /usr/bin/qmake-4.7 -d /Library/Python/3.1/site-packages --use-arch i386
    but it doesn't seem to work for me, still doesn't work.

    running with the --verbose flag gives me the following:

    Code:
    Determining the layout of your Qt installation...
    /usr/bin/qmake-4.7 -spec macx-g++ -o qtdirs.mk qtdirs.pro
    make -f qtdirs.mk
    g++ -c -pipe -Xarch_i386 -mmacosx-version-min=10.4 -g -gdwarf-2 -arch i386 -Wall -W -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I../../include/QtCore -I../../include -I.moc/debug-shared -F/Users/jamieroos/lib -o .obj/debug-shared/qtdirs.o qtdirs.cpp
    In file included from ../../include/QtCore/QFile:1,
                     from qtdirs.cpp:1:
    ../../include/QtCore/qfile.h:1:85: error: ../../Downloads/qt-everywhere-opensource-src-4.6.3/src/corelib/io/qfile.h: No such file or directory
    In file included from ../../include/QtCore/QLibraryInfo:1,
                     from qtdirs.cpp:2:
    ../../include/QtCore/qlibraryinfo.h:1:96: error: ../../Downloads/qt-everywhere-opensource-src-4.6.3/src/corelib/global/qlibraryinfo.h: No such file or directory
    In file included from ../../include/QtCore/QTextStream:1,
                     from qtdirs.cpp:3:
    ../../include/QtCore/qtextstream.h:1:91: error: ../../Downloads/qt-everywhere-opensource-src-4.6.3/src/corelib/io/qtextstream.h: No such file or directory
    qtdirs.cpp: In function ‘int main(int, char**)’:
    qtdirs.cpp:7: error: ‘QFile’ was not declared in this scope
    qtdirs.cpp:7: error: expected `;' before ‘outf’
    qtdirs.cpp:9: error: ‘outf’ was not declared in this scope
    qtdirs.cpp:9: error: ‘QIODevice’ has not been declared
    qtdirs.cpp:9: error: ‘QIODevice’ has not been declared
    qtdirs.cpp:9: error: ‘QIODevice’ has not been declared
    qtdirs.cpp:12: error: ‘QTextStream’ was not declared in this scope
    qtdirs.cpp:12: error: expected `;' before ‘out’
    qtdirs.cpp:14: error: ‘out’ was not declared in this scope
    qtdirs.cpp:14: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:14: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:15: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:15: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:16: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:16: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:17: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:17: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:18: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:18: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:19: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:19: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:21: error: ‘QT_VERSION’ was not declared in this scope
    qtdirs.cpp:22: error: ‘QT_EDITION’ was not declared in this scope
    qtdirs.cpp:24: error: ‘QLibraryInfo’ has not been declared
    qtdirs.cpp:90: error: ‘qreal’ was not declared in this scope
    make: *** [.obj/debug-shared/qtdirs.o] Error 1
    Error: Failed to determine the layout of your Qt installation. Try again using
    the --verbose flag to see more detail about the problem.
    ARGH. will try again later.
    Phone: iPhone 4S 32GB iOS 5.1.1 Jailbroken
    Mac: MacBook Pro 15" Core i5 @ 2.4GHz, 4GB RAM, 10.7.4
    Custom Build: Corsair 650D, Gigabyte GA-Z68X-UD4-B3, Intel i5 2500K @ 4.4GHz, 8GB RAM @ 1866Mhz, Corsair H70 watercooler

 

 

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
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 12:56 PM.
twitter, follow us!