question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spyder crash on startup

See original GitHub issue

Problem Description

Spyder crashing on startup. Opening spyder from Anaconda prompt shows an ImportError: cannot import name ‘constants’ from ‘zmq.backend.cython’

What steps reproduce the problem?

  1. Open spyder

What is the expected output? What do you see instead?

Expect to open spyder, getting error message below by opening it in the Anaconda Prompt and an error dialogue window when opening it through the windows start menu.

Paste Traceback/Error Below (if applicable)

Traceback (most recent call last): File “C:\Anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 3285, in main mainwindow = run_spyder(app, options, args) File “C:\Anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 3140, in run_spyder main.setup() File “C:\Anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 844, in setup from spyder.plugins.editor import Editor File “C:\Anaconda3\lib\site-packages\spyder\plugins\editor.py”, line 41, in <module> from spyder.utils.introspection.manager import IntrospectionManager File “C:\Anaconda3\lib\site-packages\spyder\utils\introspection\manager.py”, line 21, in <module> from spyder.utils.introspection.plugin_client import PluginClient File “C:\Anaconda3\lib\site-packages\spyder\utils\introspection\plugin_client.py”, line 18, in <module> import zmq File “C:\Users\Erik Brodin\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\zmq_init_.py”, line 47, in <module> from zmq import backend File “C:\Users\Erik Brodin\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\zmq\backend_init_.py”, line 40, in <module> reraise(*exc_info) File “C:\Users\Erik Brodin\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\zmq\utils\sixcerpt.py”, line 34, in reraise raise value File “C:\Users\Erik Brodin\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\zmq\backend_init_.py”, line 27, in <module> ns = select_backend(first) File “C:\Users\Erik Brodin\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\zmq\backend\select.py”, line 28, in select_backend mod = import(name, fromlist=public_api) File "C:\Users\Erik Brodin\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\zmq\backend\cython_init.py", line 6, in <module> from . import (constants, error, message, context, ImportError: cannot import name ‘constants’ from ‘zmq.backend.cython’ (C:\Users\Erik Brodin\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\zmq\backend\cython_init_.py) [13456:13432:0805/171436.298:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)


## Versions

* Spyder version: 3.3.6
* Python version: 3.7.3
* Qt version: 5.9.7
* PyQt version: 5.9.2
* Operating System name/version: Windows 10 Pro (Version 1803)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tnankiecommented, Oct 31, 2019

thanks I think. I had got it working using pip to reinstall zmq. but I know this isn’t best practice so I’ve now uninstalled anaconda and deleted that entire directory and in the process of reinstalling.

Hopefully I’ll then have a functional and stable (and hopefully update-able) Anaconda install. Will let you know if it is still broken.

And everything appears to be working, thanks for your help.

1reaction
ccordoba12commented, Oct 31, 2019

You have some leftovers of a previous pip installation here:

C:\Users\Grey Ghost\AppData\Roaming\Python\Python37\

and that’s what’s causing the error. Just remove that directory and you’ll be set.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spyder crashes on startup and the reset command doesn't ...
I solved it by using: conda uninstall spyder conda install spyder.
Read more >
Spyder crash on startup · Issue #12502 - GitHub
In case anyone is experiencing the crash after changing Spyder's theme, try running spyder --reset in your terminal. It worked for me.
Read more >
Spyder crashes at launch: "python.exe has stopped working"
1. Uninstalling and reinstalling · 2. Resetting spyder (spyder --reset) · 3. deleting the .spyder2 directory · 4. changing the spyder config file,...
Read more >
First Steps — Spyder 5 documentation
If Spyder crashes or you receive an error message, please read the following troubleshooting steps before opening a new issue. There's a good...
Read more >
spyder crashes on startup - Ubuntu - Launchpad Answers
spyder crashes on startup ... Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Traceback ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found