28 februari 2015

Installing PyQt5 on Mac OS X Yosemite - Versions python 3.4.3, Qt 5.4.1 and pyqt 5.4.1

Installing PyQt5 on Mac OS X Yosemite - Versions python 3.4.3, Qt 5.4.1 and pyqt 5.4.1

First of all install Python 3.4.3 if you don’t already have it:

On the Mac OS X computer, create a folder called Sources

Downloading stuff into folder Sources:

Uncompress files:

Doubleclick on PyQt-gpl-5.4.1.tar.gz and sip-4.16.6.tar.gz to uncompress.



Open /Applications/Utilities/Terminal

Note 1: Don´t forget to use python3 command instead of python
Note 2: I use robert as username in this example

In Terminal:

$ cd /Users/robert/Desktop/Sources

$ cd sip-4.16.6
                  #cd into the folder sip-4.16.6
$ python3 configure.py -d /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ --arch x86_64
                  # —arch in my case is x86_64 since I have MacBook Pro. Also use python3 instead of python.

$ cd make

$ sudo make install


Install qt-opensource-mac-x64-clang-5.4.1.dmg
Install pyqt:

$ cd /Users/robert/Desktop/Sources
$ cd PyQt-gpl-5.4.1
$ python3 configure.py -q /usr/bin/qmake -d /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/
$ make
$ sudo make install


Try:

PyQt5 codes can be found at e.g http://zetcode.com/gui/pyqt5/firstprograms/

BTW: I use IDE pycharm from https://www.jetbrains.com/pycharm/




Inga kommentarer:

Skicka en kommentar