CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 319
Description
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