[PyQt] Can't use static PyQ5 build during development on Mac OS X

Marius Shekow marius.shekow at fit.fraunhofer.de
Tue Nov 10 16:07:36 GMT 2015


Hi,

my goal is to distribute a redistributable application on Mac OS X, not 
making any assumptions about what Python, Qt, PyQt, ... the user has 
installed. I.e. my goal is to produce a self-contained build.

For this I want to use the existing/unmodified (dynamically linked) 
Python 3.4 and Qt 5.5.1 distributions (because building them myself is 
hard), and statically compile the other dependencies, such as SIP, PyQt, 
sqlite3, etc.

I'm using Mac OS X El Capitan. I've downloaded Python 3.4.3 from the 
official website and installed it. I've downloaded SIP from the 
RiverSide homepage and compiled it statically (with python3 configure.py 
--static + make + sudo make install). I.e. I'm using the python3 binary 
(for configuration) that is installed from the official Python 3.4.3 
installer.

I've downloaded and installed Qt 5.5.1 from the official Qt homepage 
(the 32/64-bit Intel distribution). This installs it to ~/Qt5.5.1

I've then downloaded the PyQt5 sources and also built them statically 
(python3 configure.py --static --qmake ~/Qt5.5.1/5.5/clang_64/bin/qmake)
I've also done "sudo make install".

The issue is that I can't really develop Python code this way. My IDE 
(PyCharm) claims that there is nothing in the PyQt5 package in 
site-packages. The directory is there, in 
/LIbrary/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/PyQt5. 
It contains an __init__.py, a bunch of .a library files and the uic 
directory with lots of other stuff". But references such as 
PyQt5.WtWidgets can't be resolved.

I'd really like to be able to code in Python on MacOS X with that static 
version. Is that possible?

Best regards,
Marius Shekow
-- 
Marius Shekow
Mixed and Augmented Reality Solutions, Fraunhofer FIT
http://www.fit.fraunhofer.de/mars
Tel.: +49 (0)2241 - 14-2184


More information about the PyQt mailing list