A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.
- xcode 5.1.1
- python 3.4.0
- Qt libraries 5.2.1
- SIP 4.15.5
- PyQt 5.2.1
- install xcode
- install the Command Line Tools (open Xcode > Preferences > Downloads)
- install Qt libraries (qt-opensource-mac-x64-clang-5.2.1.dmg)
- install python 3.4
- create a virtual env (i.e. ~/.env/ariane_mail)
- unzip and compile SIP and PyQt
cd /var/tmp
cp /Users/gvincent/Downloads/PyQt-gpl-5.2.1.tar.gz .
cp /Users/gvincent/Downloads/sip-4.15.5.tar.gz .
tar xvf PyQt-gpl-5.2.1.tar.gz
tar xvf sip-4.15.5.tar.gz
cd sip-4.15.5/
python3 configure.py -d ~/.env/ariane_mail/lib/python3.4/site-packages --arch x86_64
make
sudo make install
sudo make clean
cd ../PyQt-gpl-5.2.1/
python3 configure.py --destdir ~/.env/ariane_mail/lib/python3.4/site-packages --qmake ~/Qt5.2.1/5.2.1/clang_64/bin/qmake
make
sudo make install
sudo make clean
~/.env/ariane_mail/bin/python -c "import PyQt5"
I apparently am missing the QtWebKit and QtWebKitWidgest with the latest Qt5.6.0 and PyQt5.5.1, and I got the following error when I tried to run spyder
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/spyderlib/spyder.py", line 3119, in main
mainwindow = run_spyder(app, options, args)
File "/usr/local/lib/python3.5/site-packages/spyderlib/spyder.py", line 3005, in run_spyder
main.setup()
File "/usr/local/lib/python3.5/site-packages/spyderlib/spyder.py", line 822, in setup
message=_("Spyder Internal Console\n\n"
File "/usr/local/lib/python3.5/site-packages/spyderlib/plugins/console.py", line 79, in init
self.find_widget.set_editor(self.shell)
File "/usr/local/lib/python3.5/site-packages/spyderlib/widgets/findreplace.py", line 250, in set_editor
from spyderlib.qt.QtWebKit import QWebView
File "/usr/local/lib/python3.5/site-packages/spyderlib/qt/QtWebKit.py", line 10, in
from PyQt5.QtWebKitWidgets import QWebPage, QWebView # analysis:ignore
ImportError: dlopen(/usr/local/lib/python3.5/site-packages/PyQt5/QtWebKitWidgets.so, 2): Library not loaded: /usr/local/opt/qt5/lib/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets
Referenced from: /usr/local/lib/python3.5/site-packages/PyQt5/QtWebKitWidgets.so
Reason: image not found
How should I install the QtWebKitWidgest?