[PyQt] Qt classes not available
Barry
barry at barrys-emacs.org
Fri Nov 16 15:38:41 GMT 2018
> On 16 Nov 2018, at 03:59, Glenn Ramsey <gr at componic.co.nz> wrote:
>
> Hi,
>
> I have built PyQt5 (PyQt5_commercial-5.12.dev1810261601 or
> PyQt5_commercial-5.11.3) against a development version of Qt 5.12 from git and
> Python 2.7.15 on Windows10 using VS2017. I've tried sip 4.19.13 and
> sip-4.19.14.dev1810291324. Building and installing appears to have completed
> without errors.
FYI: See https://wiki.python.org/moin/WindowsCompilers for the compiler version to use with 2.7 on windows. VS2017 is too new. Microsoft provides visual studio for python 2.7 because of the compatibility issues if you newer compilers.
Barry
>
> PyQt doesn't seem to be wrapping the Qt objects as they do not appear to be
> available in the PyQt5 namespace as shown in the following output:
>
> Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit
> (AMD64)] on win32
> Type "copyright", "credits" or "license()" for more information.
>>>> import PyQt5
>>>> from PyQt5.QtCore import QTimer
>
> Traceback (most recent call last):
> File "<pyshell#1>", line 1, in <module>
> from PyQt5.QtCore import QTimer
> ImportError: No module named sip
>>>> import sip
>>>> from PyQt5.QtCore import QTimer
>
> Traceback (most recent call last):
> File "<pyshell#3>", line 1, in <module>
> from PyQt5.QtCore import QTimer
> ImportError: cannot import name QTimer
>>>> dir(PyQt5.QtCore)
> ['QT_TRANSLATE_NOOP', 'QT_TR_NOOP', 'QT_TR_NOOP_UTF8', 'Q_ARG', 'Q_CLASSINFO',
> 'Q_ENUM', 'Q_ENUMS', 'Q_FLAG', 'Q_FLAGS', 'Q_RETURN_ARG', '__doc__', '__name__',
> '__package__', 'bin_', 'bom', 'center', 'dec', 'endl', 'fixed', 'flush',
> 'forcepoint', 'forcesign', 'hex_', 'left', 'lowercasebase', 'lowercasedigits',
> 'noforcepoint', 'noforcesign', 'noshowbase', 'oct_', 'pyqtPickleProtocol',
> 'pyqtRemoveInputHook', 'pyqtRestoreInputHook', 'pyqtSetPickleProtocol',
> 'pyqtSlot', 'qAbs', 'qAddPostRoutine', 'qAddPreRoutine', 'qChecksum',
> 'qCompress', 'qCritical', 'qDebug', 'qEnvironmentVariable', 'qErrnoWarning',
> 'qFatal', 'qFloatDistance', 'qFormatLogMessage', 'qFuzzyCompare', 'qInf',
> 'qInfo', 'qInstallMessageHandler', 'qIsFinite', 'qIsInf', 'qIsNaN', 'qIsNull',
> 'qQNaN', 'qRegisterResourceData', 'qRemovePostRoutine', 'qRound', 'qRound64',
> 'qSNaN', 'qSetFieldWidth', 'qSetMessagePattern', 'qSetPadChar',
> 'qSetRealNumberPrecision', 'qSharedBuild', 'qUncompress',
> 'qUnregisterResourceData', 'qVersion', 'qWarning', 'qrand', 'qsrand', 'reset',
> 'right', 'scientific', 'showbase', 'uppercasebase', 'uppercasedigits', 'ws']
>>>>
>
> Any ideas why this might be? I've been following this build process for years
> and never had an issue like this before.
>
> Do I need to also build Python myself using VS2017?
>
> Glenn
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20181116/23f1e2d0/attachment.html>
More information about the PyQt
mailing list