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 not working w/ WinPython-64bit-3.6.3.0Qt5

See original GitHub issue

hi,

the subject is not quite right, after a nasty tweak i got it working (somewhat), please bear with me.

note my system is Win7-64 and i want to use the latest python 3.6 and spyder/qt5. i know what you have said elsewhere about this combination … however, all WinPython3/qt distros of the last 1.5 years have worked for me without problems, incl WinPython-64bit-3.6.2.0Qt5. mind you: i have never registered WinPython with the OS and i usually (have to) delete the previous .[enter-settings-dir-here]. (there are sometimes quirks with the firewall that need to be sorted out though.)

now i tried to migrate to WinPython-64bit-3.6.3.0Qt5, but spyder just won’t start. this is the traceback from the error log (cf issue #579):

Traceback (most recent call last):
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\app\mainwindow.py", line 3099, in main
    mainwindow = run_spyder(app, options, args)
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\app\mainwindow.py", line 3001, in run_spyder
    main.setup()
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\app\mainwindow.py", line 1171, in setup
    self.setup_layout(default=False)
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\app\mainwindow.py", line 1437, in setup_layout
    self.setup_default_layouts('default', settings)
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\app\mainwindow.py", line 1614, in setup_default_layouts
    widget.toggle_view(True)
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\plugins\ipythonconsole.py", line 713, in toggle_view
    self.create_new_client(give_focus=False)
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1009, in create_new_client
    self.connect_client_to_kernel(client)
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1035, in connect_client_to_kernel
    stderr_file)
  File "B:\P\python-3.6.3.amd64\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1440, in create_kernel_manager_and_kernel_client
    kernel_manager.start_kernel(stderr=stderr)
  File "B:\P\python-3.6.3.amd64\lib\site-packages\jupyter_client\manager.py", line 234, in start_kernel
    "Currently valid addresses are: %s" % local_ips()
RuntimeError: Can only launch a kernel on a local interface. Make sure that the '*_address' attributes are configured properly. Currently valid addresses are: ['130.216.54.47', '0.0.0.0', '']

the usual tricks of deleting (all) the .settings dirs and running spyder_reset did not help.

the code eventually failing seems to be jupyter_client\manager.py, line ~234

        if self.transport == 'tcp' and not is_local_ip(self.ip):
            raise RuntimeError("Can only launch a kernel on a local interface. "
                               "Make sure that the '*_address' attributes are "
                               "configured properly. "
                               "Currently valid addresses are: %s" % local_ips()
                               )

i realize that this test was present in older releases as well, yet, something triggers it to fail in the latest release.

now the remedy: if i comment this test out, spyder starts up normally, my code works, my plots plot - hurray!

obviously, this is not an ideal solution and i hope that you might be able to track down what the root problem is.

finally, while most is running fine after this tweak, i run into one issue which i cannot tell if it is related to my tweak, the root problem, or some unrelated spyder bug: i don’t like inline graphics so i set IPython_console/Graphics/Backend to Automatic or Qt5. When doing so, restarting the kernel in an IPython console triggers a runtime error:

 Traceback (most recent call last):

  File "<ipython-input-1-64557277dbff>", line 1, in <module>
    get_ipython().run_line_magic('matplotlib', 'qt5')

  File "B:\P\python-3\lib\site-packages\IPython\core\interactiveshell.py", line 2095, in run_line_magic
    result = fn(*args,**kwargs)

  File "<decorator-gen-108>", line 2, in matplotlib

  File "B:\P\python-3\lib\site-packages\IPython\core\magic.py", line 187, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)

  File "B:\P\python-3\lib\site-packages\IPython\core\magics\pylab.py", line 99, in matplotlib
    gui, backend = self.shell.enable_matplotlib(args.gui)

  File "B:\P\python-3\lib\site-packages\IPython\core\interactiveshell.py", line 2983, in enable_matplotlib
    self.enable_gui(gui)

  File "B:\P\python-3\lib\site-packages\ipykernel\zmqshell.py", line 482, in enable_gui
    real_enable_gui(gui)

  File "B:\P\python-3\lib\site-packages\ipykernel\eventloops.py", line 308, in enable_gui
    raise RuntimeError("Cannot activate multiple GUI eventloops")

RuntimeError: Cannot activate multiple GUI eventloops

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:33 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
hiccup7commented, Jan 22, 2018

I tested WinPython-64bit-3.6.4.0Qt5b4, which includes Spyder v3.2.6, on my offline Windows 8.1 PC. No failures on the first run of Spyder. I set the IPython graphics backend to Qt5, enabled automatic load of Pylab and NumPy modules and restarted Spyder. No failures.

I tested WinPython-64bit-3.6.4.0Qt5b4 on my internet-connected Windows 7 PC. I configured my firewall to block pythonw.exe connections to the internet (it allows loopback connections to local host). No failures on the first run of Spyder. I set the IPython graphics backend to Qt5, enabled automatic load of Pylab and NumPy modules and restarted Spyder. No failures. My firewall logs show no attempts by pythonw.exe to connect to the internet.

I am happy with WinPython-64bit-3.6.4.0Qt5b4!

1reaction
Rhinoucommented, Jan 22, 2018

I installed the latest Anaconda 5.0.1/64b and can confirm Spyder works as expected. Two above mentiones bugs (changing layout and on-line help) does not occur there. That is strange, because Anaconda 5.0.1 is using the same Spyder version (3.2.4) as the latest WinPython. It seems bug is not in Spyder, but in WinPython installer…

Read more comments on GitHub >

github_iconTop Results From Across the Web

WinPython
WinPython. The easiest way to run Python, Spyder with SciPy and friends out of the box on any Windows PC, without installing anything!...
Read more >
WinPython / Tickets / #104 Spyder won't start - SourceForge
What steps will reproduce the problem? 1. Install WinPython portably in C:\Programs 2. Double click on Spyder.exe 3. Spyder fails to start.
Read more >
WinPython 3.6.3.0Qt5 集成的包_tumin999的博客
Name Version Description Python 3.6.3 Python programming language with standard library alabaster 0.7.10 A configurable sidebar‑enabled Sphinx theme babel 2.5.1 Internationalization utilities
Read more >
Spyder IDE won't start WinPython-64bit- 2.7.10.2
I am running Windows 8.1 64 bit. I tried installing WinPython-64bit- 2.7. When I try starting spyder from the command prompt i face...
Read more >
Re: Spyder & Control Panel not working - Google Groups
bat file to start spyder. Did you move the WinPython folder after unpacking? I've had problems with Spyder after doing that. On Saturday,...
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