[PyQt] pyqtdeployed app doesn't find time, datetime

Phil Thompson phil at riverbankcomputing.com
Wed Jul 30 19:34:02 BST 2014


On 28/07/2014 2:02 pm, Andrea Peter wrote:
> Hi,
> so here I am with my pyqtdeployed application (thanks Phil for the
> response of 2014/07/13), I run qmake and make successfully,
> but when I launch the generated executable it says:
> 
> ImportError: No module named time
> 
> I boiled it down to a tiny python script which I then pyqtdeploy'd,
> qmake'd and make'd:
> 
> import time
> print("it is %s" % time.time())
> 
> Same result, I did that with /datetime/ too, same result.
> 
> I built python with /time/ (and others like /datetime/, etc.) as
> static modules (via the Modules/Setup file),
> if I open the used interpreter and do:
> 
> import time
> help(time)
> 
> it says:
> 
> FILE
>     (built-in)
> 
> instead of indicating the .so file as it does normally. I think that
> indicates they are static, right?
> also, in the standard library in lib-dynload /time.so, datetime.so/
> are not present, another hint that they are built statically, right?
> 
> Any ideas?

I'm not sure about your particular problem, however...

The current hg version supports building the standard library extension 
modules like time and datetime. I've tested that I can import them in a 
deployed application. I haven't updated the docs yet.

Phil


More information about the PyQt mailing list