[PyQt] pyqtdeploy build can't find modules
David Beck
dbeck at ualberta.ca
Fri Mar 11 18:06:10 GMT 2016
I added an __init__.py to the ELFB directory and get the same results. I will try making a completely “flat” version of my project to see if it can be deployed that way (but it makes project management just that little bit messier).
As you suggested, I cloned the Mercurial repository for PyQtDeploy and deployed pyqtdeploy.app successfully. If I try deploy my ELFB.pdy file, I get the output:
Generating code...
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources/eFieldBook_Qt5
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources/eFieldBook_Qt5/palettes
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources/eFieldBook_Qt5/ui
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources/eFieldBook_Qt5/ui/rsrc
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources/collections
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources/encodings
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources/importlib
Creating directory /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/resources/PyQt5
Running 'python3.5 -OO /var/folders/xc/l59x44tx4_bbl7d78cp44fyc0000gn/T/pyqtdeploy-hwtH42/freeze.py /var/folders/xc/l59x44tx4_bbl7d78cp44fyc0000gn/T/pyqtdeploy-hwtH42/jobs.csv'
Unable to freeze files
No such file or directory
I looked and there is no /pyqtdeploy-hwtH42/freeze.py or jobs.csv at that location. Neither were requested when I was deploying pyqtdeploy.pdy. I don’t know if that is related to my original problem, but it might have something to do with how the Mercurial pyqtdeploy was deployed.
cheers,
David
> On Mar 9, 2016, at 8:51 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
>
> On 27 Feb 2016, at 5:14 pm, David Beck <dbeck at ualberta.ca> wrote:
>>
>> I’m (still) trying to build an app using PyQtDeploy (working on an iMac running OSX 10.11, latest XCode and CLT installed, Python 3.5, Qt5.5.1, SIP 4.17, PyQy5.5, PyqtDepoy installed using pip). The application source consists of a set of .py files and two modules that contain the UIs for the various windows and dialogs. The directory structure looks like this:
>>
>> ELFB/
>> eFieldBook.py (main)
>> [other .py files]
>> ui/
>> __init__.py
>> [files for the main window UI]
>> palettes/
>> __init__.py
>> [etc]
>>
>> When try to build this in the PyQtDeploy GUI, I get the following faliure:
>>
>> make succeeded.
>> Running eFieldbook...
>> Running '/Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/eFieldbook.app/Contents/MacOS/eFieldbook'
>> /Users/David/OpenSource/PyQtDeploy/sysroot-macosx/build/eFieldbook.app/Contents/MacOS/eFieldbook failed.
>> Traceback (most recent call last):
>> File "eFieldBook.py", line 2, in <module>
>> File "bootstrap.py", line 969, in _find_and_load
>> File "bootstrap.py", line 944, in _find_and_load_unlocked
>> File "bootstrap.py", line 222, in _call_with_frames_removed
>> File "bootstrap.py", line 969, in _find_and_load
>> File "bootstrap.py", line 956, in _find_and_load_unlocked
>> ImportError: No module named ‘ui'
>>
>> I have the module “ui” and its contents checked off in the Application Package Directory window on the Application Source tab, and I see the corresponding .pyo files in the /build/resources/eFieldBook_Qt5/ui folder. Is there something else I need to do to make the ui module visible to the app? (Adding the module directories to the sys.path field on the “Application Sources” tab didn’t help.)
>
> I would expect to see an __init__.py in the ELFB directory.
>
> pyqtdeploy itself is deployable and its .pdy files can be found at...
>
> https://www.riverbankcomputing.com/hg/pyqtdeploy/file/
>
> Phil
More information about the PyQt
mailing list