简体   繁体   English

无法从Pyside导入QtCore

[英]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.4和3.2.2的Windows 8.1机器,在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 但是在使用3.2.2时出现错误

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. 我尝试重新安装PySide,并添加“ C:\\ Qt \\ 4.8.6 \\ bin”,但是这些步骤没有任何区别。

Interestingly the QtCore. 有趣的是,QtCore。 version reports version 4.8.5 although i have Qt version 4.8.6 installed. 版本报告版本4.8.5,尽管我安装了Qt版本4.8.6。

How could i get PySide working on the python 3.2.2 too? 我如何也可以在python 3.2.2上使用PySide?

Edit: 编辑:
I also tried reinstalling QT, this time using "qt-opensource-windows-x86-vs2008-4.8.6.exe" from Qt homepage 我还尝试过重新安装QT,这次使用Qt主页上的“ qt-opensource-windows-x86-vs2008-4.8.6.exe”

I reinstalled everything (python and packages) from scratch and now it seems to work. 我从头开始重新安装了所有内容(python和软件包),现在看来可以正常工作。 This time i used python version 3.2.5 though. 这次我使用的是python 3.2.5版本。 I'm not sure if starting from scratch or updating 3.2 python fixed it. 我不确定是从头开始还是更新3.2 python来修复它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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