[PyQt] Issue with pyqtdeploy

Phil Thompson phil at riverbankcomputing.com
Fri Jan 6 14:49:45 GMT 2017


On 6 Jan 2017, at 12:50 pm, Matthew Lemon <matt at matthewlemon.com> wrote:
> 
> Hi,
> 
> I'm currently testing pyqtdeploy as a possible solution to deploying a PyQt
> application I am working on.
> 
> I am testing on a very simple application but am unable to build for what looks
> like a very simple reasons, so I guess I'm doing something in correct in the
> config.
> 
> The basic problem is the error:
> Freezing /usr/lib/python3.5/site-packages/PyQt5/__init__.py...
> [Unable to freeze files]
> 
> There is no site-packages directory at /usr/lib/python3.5, which is clearly
> why, however I can't figure out how to point pyqtdeploy to the correct
> site-packages directory in my virtualenv, where PyQt5 is installed. Or
> at least I can (in Target Python Locations : Standard library directory), but
> when I do that, because virtualenv or venv do not include the full standard
> library (even with --system-site-packges option in virtualenv, seemingly), then
> pyqtdeploy does not find the standard library modules it needs.
> 
> I tried installing PyQt5 in system python3, but I think it goes into
> a dist-packages directory there, so not found in
> /usr/lib/python3.5/site-packages either.
> 
> I'm doing this on Debian 8.
> 
> Hoping someone may be able to assist configuring pyqtdeploy to find the correct
> locations. Many thanks!

pyqtdeploy is about converting your Python code (or as much of it as you want) to an executable. If you want to use an external PyQt then don't even mention it to pyqtdeploy, just make sure it is accessible at run time using an appropriate sys.path.

If you want to include PyQt in your executable then you need to compile a static version of it.

Phil


More information about the PyQt mailing list