Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
使用Qt写了个窗口,运行报错,无法正常运行python程序,获得的报错信息如下:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
经过仔细查看发现是在使用Qt模块导入了Qt4和Qt5两个模块(存在重合的部分),部分代码如下:
//Qt5
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import QFont, QBrush
from PyQt5.QtWidgets import QTableWidget
from PyQt4 import Qt //QT4
class Ui_TabWidget(object):
def setupUi(self,TabWidget):
TabWidget.setObjectName("TabWidget")
TabWidget.resize(962, 618)
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.lineEdit = QtWidgets.QLineEdit(self.tab)
self.lineEdit.setGeometry(QtCore.QRect(10, 20, 291, 31))
self.lineEdit.setObjectName("lineEdit")
self.label = QtWidgets.QLabel(self.tab)
self.label.setGeometry(QtCore.QRect(310, 30, 54, 21))
self.label.setObjectName("label")
self.fontComboBox = QtWidgets.QFontComboBox(self.tab)
self.fontComboBox.setGeometry(QtCore.QRect(350, 20, 161, 31))
self.fontComboBox.setObjectName("fontComboBox")
self.pushButton = QtWidgets.QPushButton(self.tab)
......
我尝试着去除Qt4和Qt5重合导入的模块,运行发现可以成功,自以为这就是失败的原因了,为了放心我又单独测试了一下导入Qt4,代码如下:
# !/usr/bin/env python
# -*- encoding:utf-8 -*-
import sys
from PyQt4 import QtCore, QtGui, QtWidgets
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
w = QtWidgets.QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('helloworld')
w.show()
sys.exit(app.exec_())
结果运行如下:
/usr/bin/python2.7 ~/helloworld
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
如此可以发现,不是由于重复导入模块而导致运行失败的,可以确认是由于Qt4模块自身出现了异常,猜测可能是由于sip导致Qt4模块的异常,然后发现我并没有PyQt4_gpl_x11,为了验证,我重新安装了PyQt4来验证,Ubuntu中安装配置过程如下:
1)安装sip
地址:http://www.riverbankcomputing.co.uk/software/sip/download
cd sip-4.19.3/
sudo python configure.py
sudo make install
2)安装Qt4的依赖
sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-demos qt4-designer
sudo apt-get install libqwt5-qt4 libqwt5-qt4-dev
3)安装PyQt4
cd PyQt4_gpl_x11-4.12.1
sudo python configure.py
sudo make
sudo make install
重新运行,成功运行!!!
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)的更多相关文章
- [报错] Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
今天下午做python的作业,我用PyQt5 中 利用QWebEngineView打开外部网页. 但是一直闪退,一运行就闪退. 显示报错:Process finished with exit code ...
- tensorflow Process finished with exit code 137 (interrupted by signal 9: SIGKILL) 错误
Process finished with exit code 137 (interrupted by signal 9: SIGKILL) 在使用tensorflow自带的数据集做手写数字识别的时候 ...
- Pycharm出现Segmentation fault...(interrupted by signal 11: SIGSEGV)的解决方法
众所周知,用pycharm远程服务器debug代码已经成为学习深度学习相关代码的有力工具,但是最近创建了一个虚拟环境,进行debug的时候,莫名会出现下面这个错误,看的我都抽风了 bash: line ...
- cordova Process finished with exit code -1
安装完cordova之后,创建一个测试项目后,运行报Process finished with exit code -1,经过查找原因,是因为gradle没有安装,在http://www.androi ...
- [idea] - 项目启动报错Process finished with exit code 1
今天运行项目发现一个bug, "C:\Program Files\Java\jdk1.8.0_191\bin\java.exe" -XX:TieredStopAtLevel=1 - ...
- pycharm Process finished with exit code (0xC0000005)
pycharm Process finished with exit code (0xC0000005)解决办法 上次报过这个错误,是在安装浏览器时发现的,报过同样的错误.按当时的方法,以为切地解 ...
- pycharm 出现Process finished with exit code 0 或 Process finished with exit code -1
Process finished with exit code 0 意味着你的程序正常执行完毕并退出. 可以科普一下exit code,在大部分编程语言中都适用: exit code 0 表示程序执行 ...
- Android-AndroidStudio-AVD启动不了-emulator: Process finished with exit code 1
注意:解决此错误目前只针对Windows系统的电脑: 1.AndroidStudio-->AVDManager(Create Virtual Device): 2.提示AVD启动不了,同时Eve ...
- spring boot 运行提示:Process finished with exit code 1
spring boot 运行提示:Process finished with exit code 1 经检查发现是由于在application.properties配置文件中将某些自定义配置项移除了, ...
随机推荐
- iOS开发-Apple Pay-苹果支付
转自:http://www.open-open.com/lib/view/open1471952847228.html Apple Pay,是苹果公司在2014年苹果秋季新品发布会上发布的一种基于NF ...
- yarn 与 npm 比较
一.首先需要了解的命令 npm install === yarn —— install 安装是默认行为. npm install taco --save === yarn add taco —— ta ...
- 2017 CCPC秦皇岛 M题 Safest Buildings
PUBG is a multiplayer online battle royale video game. In the game, up to one hundred players parach ...
- 这个Python爬虫的简单入门及实用的实例,你会吗?
前言本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理.作者:HOT_and_COOl 利用爬虫可以进行数据挖掘,比如可以爬取别人的网 ...
- [golang] nats的消息传递模型介绍
目录 nats的消息传递模型 What is NATS 主题式消息(Subject-Based Messaging) 发布订阅(Publish-Subscribe) 请求应答(Request-Repl ...
- 从RTL视图到Verilog语言-转可乐豆原创
从RTL视图到Verilog语言 曾经听过某位大牛都说:“当你的学习FPGA到一个境界的时候,你看到的硬件描述语言,将不再是单纯的语言,而是由一个个逻辑门组成的电路图,一旦达到这个境界,方能把代码写到 ...
- JS-常考算法题解析
常考算法题解析 这一章节依托于上一章节的内容,毕竟了解了数据结构我们才能写出更好的算法. 对于大部分公司的面试来说,排序的内容已经足以应付了,由此为了更好的符合大众需求,排序的内容是最多的.当然如果你 ...
- sql语句对int类型进行模糊查询
重点:select * from course where cast(courseId as char) like '%118%'; 首先可以将int类型转换为string类型的值再进行模糊查询,用方 ...
- SQL中Group By和having的用法
转自 ITGirl笑笑 一.GROUP BY GROUP BY语句用来与聚合函数(aggregate functions such as COUNT, SUM, AVG, MIN, or MAX. ...
- Soc EmbeddedDesign Suite (EDS)13.1.0.162安装
1.双击SoCEDSSetup-13.1.0.162.exe弹出如下窗口: 2.点击Next,弹出License Agreement界面: 3.选择I accept the agreement,点击N ...