Spyder (Ubuntu 18.04) Segmentation Fault错误解决方案

1、Ubuntu环境下,安装了tensorflow,运行Spyder,出现Segmentation Fault错误

2、原因查找:

    1)pyqt、qt都已经安装;

    2)pip install - U spyder,重新安装,仍然报错;

3、环境描述

    xxxxx@xxxxxer:~/anaconda3/bin$ inxi -G
           Graphics:  Card: Intel 3rd Gen Core processor Graphics Controller
           Display Server: x11 (X.Org 1.19.6 ) driver: i915
           Resolution: 1366x768@60.10hz
           OpenGL: renderer: Mesa DRI Intel Ivybridge Mobile

           version: 4.2 Mesa 18.0.0-rc5

(base) xxxxx@xxxxer:~/anaconda3/bin$ gdb ./python
    GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
    Copyright (C) 2018 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from ./python...done.
    (gdb) run
    Starting program: /home/liuxs/anaconda3/bin/python 
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19) 
    [GCC 7.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from spyder.app.start import main
    >>> main()
    [New Thread 0x7fffce203700 (LWP 8433)]
    [New Thread 0x7fffcd7e6700 (LWP 8434)]
    [New Thread 0x7fffbde65700 (LWP 8439)]
    [New Thread 0x7fffbd664700 (LWP 8444)]
    [New Thread 0x7fffbce63700 (LWP 8445)]
    [New Thread 0x7fffaffff700 (LWP 8446)]
    [New Thread 0x7fffaf7fe700 (LWP 8447)]
    [New Thread 0x7fffaeffd700 (LWP 8448)]
    [New Thread 0x7fffae7fc700 (LWP 8449)]
    [New Thread 0x7fffadffb700 (LWP 8450)]
    [New Thread 0x7fffad7fa700 (LWP 8451)]
    [New Thread 0x7fffacff9700 (LWP 8452)]
    [New Thread 0x7fff8ffff700 (LWP 8453)]
    [New Thread 0x7fff8f7fe700 (LWP 8454)]
    [New Thread 0x7fff8e7fc700 (LWP 8456)]
    [New Thread 0x7fff8effd700 (LWP 8455)]
    [New Thread 0x7fff8dffb700 (LWP 8457)]
    [New Thread 0x7fff8d7fa700 (LWP 8458)]
    [New Thread 0x7fff8cff9700 (LWP 8459)]
    [New Thread 0x7fff73fff700 (LWP 8460)]
    [New Thread 0x7fff737fe700 (LWP 8461)]
    [New Thread 0x7fff72ffd700 (LWP 8464)]
    [New Thread 0x7fff727fc700 (LWP 8465)]
    [New Thread 0x7fff71ffb700 (LWP 8467)]
    [New Thread 0x7fff717fa700 (LWP 8468)]
    [New Thread 0x7fff70ff9700 (LWP 8470)]
    [New Thread 0x7fff5ffff700 (LWP 8471)]
    [New Thread 0x7fff5f7fe700 (LWP 8473)]
    [New Thread 0x7fff5de1b700 (LWP 8474)]
    [New Thread 0x7fff5d61a700 (LWP 8475)]
    [Thread 0x7fff5d61a700 (LWP 8475) exited]
    [Thread 0x7fff5de1b700 (LWP 8474) exited]
    [New Thread 0x7fff5de1b700 (LWP 8483)]
    [Thread 0x7fff5de1b700 (LWP 8483) exited]
    [New Thread 0x7fff5de1b700 (LWP 8485)]
    [New Thread 0x7fff5d61a700 (LWP 8490)]
    Thread 1 "python3.6" received signal SIGSEGV, Segmentation fault.
    0x0000000000000000 in ?? ()
    (gdb) exit()
    Undefined command: "exit".  Try "help".
    (gdb) 
    Undefined command: "exit".  Try "help".
    (gdb) 
    Undefined command: "exit".  Try "help".
    (gdb) Quit

4、解决方案(上面一堆废话都不需要看了)

  1. # pip3 install pyopengl
  • 重点检查pyopengl有没有安装,如果没有安装,铁定就是他的原因了
   2. Add  from OpenGL import GL  to site-packages/spyder/app/start.py(可能已经存在)
  • # This import is needed to fix errors with OpenGL when installed using pip
    # See issue 3332
    try:
        from OpenGL import GL
    except:
        pass
愉快的使用spyder吧……


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值