[报错] Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

今天下午做python的作业,我用PyQt5 中 利用QWebEngineView打开外部网页。

但是一直闪退,一运行就闪退。

显示报错:Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

直接跑网友的代码也是这样。

在我多番寻找后,既不是显卡驱动的问题,也不是同时导入多个冲突包的问题。

而是PyQt5版本的问题。

于是我新建了一个anaconda的虚拟环境,装了PyQt5 == 5.10的版本,就搞定了。

下面附带一下anaconda的操作,由于MacOS上,anaconda的命令行操作也在终端上,所以安装包的时候,注意是在那个虚拟环境下安装的。

conda create -n pyqt python=3.7 #创建虚拟环境
conda remove -n pyqt       #删除虚拟环境


conda env list                  #显示虚拟环境列表
conda activate XXX          #切换当前虚拟环境

conda config --add channels   https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes  # 添加源
conda config --remove channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/' 
conda config --show             #显示配置信息   

pip list                        #显示已安装的第三方库
pip uninstall XXX               #卸载XXX第三方库

猜你喜欢

转载自www.cnblogs.com/ckxkexing/p/12081671.html
今日推荐