pyqt / python-qt5

Unofficial PyQt5 via PyPI for Python 2.7 64-bit on Windows
GNU General Public License v3.0
280 stars 78 forks source link

ImportError: DLL load failed: %1 not a valid win32 application! #17

Closed chinant closed 8 years ago

chinant commented 8 years ago

I run the below code in win8.1 64bit and python 2.7.3:

import sys
from PyQt5 import QtWidgets

results in:

 ImportError: DLL load failed: %1 not a valid win32 application!
mottosso commented 8 years ago

Hi @chinant,

Could you try this?

:: From a cmd.exe terminal
$ pip install python-qt5
$ python
>>> # Continuing from Python
>>> import platform
>>> platform.architecture()  # Make sure your Python is 64-bit
('64bit', 'WindowsPE')
>>> from PyQt5 import QtWidgets
>>> # Did it throw an error?
chinant commented 8 years ago

Thank you @mottosso . It need python 64bit, this issue was solve.

mottosso commented 8 years ago

Perfect!