PDA

View Full Version : python imports and deployment



jmartyr
2016-01-07, 23:11
Hi,

Just wondering how python imports work when deploying desktop apps? I assume I have to put the imported .py and .pyd files somewhere on the client system in a similar place to where I have them on the dev system. I've tried putting them in the same place (lianja/scriptinglanguages/python) and in cloudserver/scriptingilanguages/python.

Thanks.

barrymavin
2016-01-07, 23:28
The deployment path for Python modules is:

C:\lianja\cloudserver\scriptinglanguages\python\

The development path for Python modules is:

C:\lianja\scriptinglanguages\python\

jmartyr
2016-01-07, 23:32
Thanks Barry.

barrymavin
2016-01-08, 00:07
The deployment path for Python modules is:

C:\lianja\cloudserver\scriptinglanguages\python\

The development path for Python modules is:

C:\lianja\scriptinglanguages\python\

jmartyr
2016-01-08, 01:12
Hi Barry,

Thanks for the reply. I have the module in that deployment folder (.py in the Lib folder and .pyd in the DLLs folder) yet the app still breaks on the "import xyz" line in my app when not run through the app builder. Is there something extra I should be doing to deploy properly? I just followed the instructions on http://www.lianja.com/doc/index.php/Packaging_Lianja_Desktop_Apps_for_Windows and then added a part that places the module in the correct location to the installer (that part works fine).

barrymavin
2016-01-08, 01:16
Hi Joanna

I've looked in our code and that's the path being used. The drive letter where the exe is run from is prefixed onto it and replaces C:

After deploying look in file explorer and make sure the files are indeed in the place you expect them to be.

yvonne.milne
2016-01-08, 05:09
Hi Joanna,

Also check that any modules required by your xyz module are also installed on the deployment target machine.

cf: http://www.lianja.com/community/showthread.php?242-Using-Python-modules&p=7908&viewfull=1#post7908

Regards,

Yvonne