[PyQt] ImportError: No module named 'time'

Jakob Simon-Gaarde jakobsg at gmail.com
Thu Mar 10 23:12:51 GMT 2016


Ahh - I see now that there are references to timemodule.c the .pro file -
only problem is that it will never be build.

Here is my pyqtdeploy command:

pyqtdeploycli --project myproject.pdy --target linux-64 build


In the resulting .pro file I can see the following variable definitions:

!linux-* {
    DEFINES += Py_BUILD_CORE
    INCLUDEPATH +=
/home/jakob/dev/tmp/testpyqt/sysroot-linux/src/Python-3.5.1/Modules
    SOURCES +=
/home/jakob/dev/tmp/testpyqt/sysroot-linux/src/Python-3.5.1/Modules/selectmodule.c
    SOURCES +=
/home/jakob/dev/tmp/testpyqt/sysroot-linux/src/Python-3.5.1/Modules/_heapqmodule.c
    SOURCES +=
/home/jakob/dev/tmp/testpyqt/sysroot-linux/src/Python-3.5.1/Modules/timemodule.c
    SOURCES +=
/home/jakob/dev/tmp/testpyqt/sysroot-linux/src/Python-3.5.1/Modules/_math.c
    SOURCES +=
/home/jakob/dev/tmp/testpyqt/sysroot-linux/src/Python-3.5.1/Modules/mathmodule.c
}

And since it is exactly linux I am building for I will of course never get
the modules build.

I wonder if I am doing something wrong in the deployment process.

On Thu, Mar 10, 2016 at 1:27 PM, Phil Thompson <phil at riverbankcomputing.com>
wrote:

> On 10 Mar 2016, at 11:38 am, Jakob Simon-Gaarde <jakobsg at gmail.com> wrote:
> >
> > I have already selected it, and yes it was selected as dependency by
> other modules.
> >
> > I still don't understand though. When is timemodule.c supposed to be
> compiled? Is it when I build my static version of Python, or is it when I
> pyqtdeploy my PyQt5 based project.
> >
> > As far as I know time is never dynamically loaded module but a pure
> built-in module.
>
> It's compiled when you compile your application. You should see a
> timemodule.o in your build directory.
>
> Phil




-- 
Med venlig hilsen / Best regards
Jakob Simon-Gaarde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160311/f77c4c2d/attachment.html>


More information about the PyQt mailing list