spyder: Spyder crashes with segmentation fault on startup in Anaconda 4.5.0

DEVELOPER NOTE: This error is now fixed in Spyder >= 3.3.0. To resolve it, please update to the current version with conda update spyder from the Anaconda Prompt/Terminal/command line, which also fixes other bugs and adds new features, enhancement and usability/documentation improvements. Thanks!

Hi, after updating Spyder on Anaconda it crashes on startup. The splash screen shows up before terminating with a segmentation fault. It can be reproduced in a minimal Anaconda environment with:

# Create minimal environment:
~$ conda --version
conda 4.5.0
~$ conda create --name tst
~$ conda activate tst
~$ conda install spyder
~$ rm -rf ~/.config/spyder-py3
~$ SPYDER_DEBUG="3" spyder --reset
*** Reset Spyder settings to defaults ***
removing: /home/brunn/.config/spyder-py3/spyder.ini
removing: /home/brunn/.config/spyder-py3/langconfig

# Run spyder:
~$ SPYDER_DEBUG="3" spyder
Start of MainWindow constructor
End of MainWindow constructor
*** Start of MainWindow setup ***
  ..core actions
  ..toolbars
  ..tools
  ..sift?
  ..plugin: internal console
    ..internal console: initializing
  ..plugin: working directory
Loading help...
Loading outline explorer...
Loading editor...
Introspection Plugin Loaded: rope
Introspection Plugin Loaded: jedi
Introspection Plugin Loaded: fallback
setfocusto: <spyder.widgets.sourcecode.codeeditor.CodeEditor object at 0x7f99901c3948>
current_changed: 0 <spyder.widgets.sourcecode.codeeditor.CodeEditor object at 0x7f99901c3948> 140297524492616
Added thread <spyder.widgets.editor.AnalysisThread object at 0x7f9990155ee8> to queue
Added thread <spyder.widgets.editor.AnalysisThread object at 0x7f9990155f78> to queue
  ..widgets
Loading file explorer...
Loading history plugin...
Loading online help...
Loading project explorer...
Updating queue:
    started: 0
    pending: 2
===>starting: <spyder.widgets.editor.AnalysisThread object at 0x7f9990155ee8>
Updating queue:
    started: 1
    pending: 1
===>starting: <spyder.widgets.editor.AnalysisThread object at 0x7f9990155f78>
Loading namespace browser...
Updating queue:
    started: 0
    pending: 0
Updating queue:
    started: 0
    pending: 0
Loading IPython console...
Setting up main window...
Setting up window...
*** End of MainWindow setup ***
Speicherzugriffsfehler (means: segmentation fault)

I’m not quite sure how to continue debugging. Investigating the core dump did not yield in any results. I’m using Debian unstable. The conda package info returns:

spyder 3.2.8 py36_0
-------------------
file name   : spyder-3.2.8-py36_0.tar.bz2
name        : spyder
version     : 3.2.8
build string: py36_0
build number: 0
channel     : https://repo.anaconda.com/pkgs/main/linux-64
size        : 2.6 MB
arch        : None
constrains  : ()
license     : MIT
md5         : 9ad003181d3ce2134a6f024b86a2cdab
platform    : None
subdir      : linux-64
timestamp   : 1521092348360
url         : https://repo.anaconda.com/pkgs/main/linux-64/spyder-3.2.8-py36_0.tar.bz2
dependencies:
    chardet >=2.0
    cloudpickle
    jedi >=0.9
    nbconvert
    numpydoc
    pickleshare
    psutil
    pycodestyle
    pyflakes
    pygments >=2.0
    pylint
    pyqt
    python >=3.6,<3.7.0a0
    pyzmq
    qtawesome >=0.4.1
    qtconsole >=4.2
    qtpy >=1.2.0
    rope >=0.9.4
    sphinx

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 2
  • Comments: 38 (16 by maintainers)

Most upvoted comments

Following a suggestion in #3326, I was able to work around the problem by doing

conda install pyopengl

This problem is also addressed in PR #7029. Thanks.

Same issue for me on Ubuntu 18.04. Doing a conda install pyopengl fixed it for me as well. Here is the output, which may shed some light.

conda install pyopengl
Solving environment: done

## Package Plan ##

  environment location: /home/jack/Anaconda3

  added / updated specs: 
    - pyopengl


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pyopengl-3.1.1a1           |      np113py36_0         1.1 MB
    numpy-1.13.3               |   py36hdbf6ddf_4         3.9 MB
    freeglut-2.8.1             |                0         554 KB
    ------------------------------------------------------------
                                           Total:         5.6 MB

The following NEW packages will be INSTALLED:

    freeglut: 2.8.1-0              
    pyopengl: 3.1.1a1-np113py36_0  

The following packages will be DOWNGRADED:

    numpy:    1.14.2-py36hdbf6ddf_1 --> 1.13.3-py36hdbf6ddf_4

By doing conda install pyopengl solve my problem on ubuntu 18.04

Ubuntu 18.04, this issue can be resolved by either conda install pyopengl or update spyder version 3.3.1 by conda update spyder

You can all also try updating to PyQt 5.9, unless you have something else in your environment blocking it (conda install pyqt=5.9 qt=5.9).

Seems like this isn’t resolved yet?

Things are solved now in Spyder 3.3.0 without the need of pyopengl. Since that version is not included in the latest Anaconda, you have to update to it with conda update spyder.

I have had this error with spyder 3.3.2. I had to update pyqt: pyqt: 5.6.0-py36_2 --> 5.6.0-py36h8210e8a_8

Now spyder runs correctly.

Just FYI, the best solution is to simply upgrade to Spyder 3.3.1, as the workaround to the third party pyopengl issue is built-in to 3.3.0 and above and there’s no need to install pyopengl. You’ll also get the latest Spyder features, bug fixes and enhancements, as well as our thoroughly updated and expanded documentation, tutorial, etc (the old ones will go away soon, since they are very out of date).

I got the same error on a fresh installation of Anaconda 3.6 on Ubuntu 18.04.01. It was a clean install without any modifications done to it and using the newest versions of everything. Seems like this isn’t resolved yet?

Can confirm conda install pyopengl solved the issue.

Could have been different drivers on the machine…I had the same issue, except on a laptop with an Intel (3630QM) and Intel (HD4000)/Nvidia (GTX 670M) setup, inside a Fedora VM running on VirtualBox.

Have a low-end AMD/Radeon DELL laptop that has the same problem, Anaconda3-5.2.0 on Ubuntu 18.04. Installing pyopengl via conda fixed it

Strange thing is I have an Intel/Nvidia DELL tower running Anaconda3-5.2.0 on Ubuntu 18.04 with no issue.


added / updated specs: - pyopengl

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
pyopengl-3.1.1a1           |      np113py36_0         1.1 MB
numpy-1.13.3               |   py36hdbf6ddf_4         3.9 MB
freeglut-2.8.1             |                0         554 KB
------------------------------------------------------------
                                       Total:         5.6 MB

The following NEW packages will be INSTALLED:

freeglut: 2.8.1-0              
pyopengl: 3.1.1a1-np113py36_0  

The following packages will be REMOVED:

anaconda: 5.2.0-py36_3         

The following packages will be DOWNGRADED:

numpy:    1.14.3-py36hcd700cb_1 --> 1.13.3-py36hdbf6ddf_4

Also, just FYI, Spyder 3.3 (out in a week or so) has a built-in workaround for the issue so you won’t need to install OpenGL and should avoid these segfaults.