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

Phil Thompson phil at riverbankcomputing.com
Wed Nov 11 11:59:35 GMT 2015


On 10 Nov 2015, at 4:07 p.m., Marius Shekow <marius.shekow at fit.fraunhofer.de> wrote:
> 
> 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".

Static libraries have to be linked against application code to create an executable. What are you linking against?

> 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?

If you plan to use the standard Qt and Python builds then what do you expect to gain from a static build of PyQt?

Phil


More information about the PyQt mailing list