from PyQt4.QtCore import * ImportError: No module named QtCore
2016-01-08 17:29
495 查看
the error is :
from PyQt4.QtCore import *
ImportError: No module named QtCore
I have try several approach to solve this problem:
1. add path to current program
2.
3. uninstall
4. uninstall ‘autoremove python2.7’ and reinstall, my notebook failed to boot
5. reinstall my Ubuntu
all of the above tries turn outs dispointted.
On accasion, i fond that i can run my .py under home directory and i tried several directory, all succeed!
I try to seek causes from my original directory organisation:
Notice that we have an PyQt4 under my working directory and .py will search
pyuic4 belongs to pyqt4-dev-tools
from PyQt4.QtCore import *
ImportError: No module named QtCore
I have try several approach to solve this problem:
1. add path to current program
2.
os.chdir(os.getcwd())
3. uninstall
remove --purgepython-qt4 and reinstall
4. uninstall ‘autoremove python2.7’ and reinstall, my notebook failed to boot
5. reinstall my Ubuntu
all of the above tries turn outs dispointted.
On accasion, i fond that i can run my .py under home directory and i tried several directory, all succeed!
I try to seek causes from my original directory organisation:
Notice that we have an PyQt4 under my working directory and .py will search
from PyQt4.QtCore import *from folder PyQt4 instead of system library. You need to remove the folder PyQt4.
THAT’S THE PROBLEM.
by the way. use pyuic4 to convert ui to py.pyuic4 belongs to pyqt4-dev-tools
相关文章推荐
- 阻止qTip将 title 变成 oldtitle
- QT中的PRI文件
- QT 通过一个http链接 打开一个浏览器和对应的网页
- QT creator 调试问题
- Qt_QDockwidget_界面布局【类似vs界面】
- QT获取系统屏幕大小
- MQTT开发总结
- VS集成Qt环境搭建
- Qt5学习笔记——QRadioButton与QButtonGroup
- QT添加程序图标及窗口图标
- VS2010 QT5 中文显示乱码的问题
- 关于Qt开发Mac程序
- Qt & opencv 学习(一)
- qt5.3.1+opencv2.4.9编译环境的搭建
- Qt事件机制浅析
- 浅议Qt的事件处理机制 二
- 浅议Qt的事件处理机制 一
- Qt & opencv 学习(二)
- Smart210一键部署运行qt程序
- Qt Creator 中的添加“注释段落”的快捷方法