简体   繁体   中英

Unable to import QtCore from Pyside

I have windows 8.1 machine with two Python installations 3.4.4 and 3.2.2 Everything looks okay in python 3.4.4

Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import PySide
>>> from PySide import QtCore
>>> QtCore.__version__
'4.8.5'

but on using 3.2.2 i get an error

Python 3.2.2 (default, Sep  4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import PySide
>>> from PySide import QtCore
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    from PySide import QtCore
ImportError: DLL load failed: The specified procedure could not be found.

I have tried reinstalling PySide, and adding "C:\\Qt\\4.8.6\\bin, but these steps have not made any difference.

Interestingly the QtCore. version reports version 4.8.5 although i have Qt version 4.8.6 installed.

How could i get PySide working on the python 3.2.2 too?

Edit:
I also tried reinstalling QT, this time using "qt-opensource-windows-x86-vs2008-4.8.6.exe" from Qt homepage

I reinstalled everything (python and packages) from scratch and now it seems to work. This time i used python version 3.2.5 though. I'm not sure if starting from scratch or updating 3.2 python fixed it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM