These are chat archives for spyder-ide/public

6th
May 2019
paulgureghian
@paulgureghian_gitlab
May 06 00:16
When I try to send output to an external terminal, it starts to open what looks like the cmd.exe terminal then it closes. How to fix this and how to choose another terminal for Spyder to execute in ?
BezukhovA
@BezukhovA
May 06 00:37

@BezukhovA I have no idea what Spyder has to do with (I assume MS Visual) Studio?
Yes. When you install Anaconda, it requests the installation of this package. Though provided as as optional, if not installed, Anaconda does not work.
Spyder in no way needs Navigator to run; at least on Windows, by far the fastest and best way to launch Spyder is via the native Start menu shortcut, and secondarily the Anaconda prompt. I never use Navigator myself; Spyder is going to incorporate many of the same GUI features inside the IDE anyway. You mean conda does not work in Anaconda prompt?
I used Anaconda to install Spyder. 'Conda' was not recognized as a valid command in Anaconda prompt.
In any case, issues installing Anaconda itself rather than specific to Spyder should be directed to them, as we have no direct control over what they do, sorry.
Thanks, I see.

Through installing the miniconda, the navigator can be installed but the spyder therein installed does not run.

Again, there's absolutely 100% no need to install Anaconda Navigator and all its attendant bugs and issues just to install Spyder; you merely need to run conda install spyder in the Anaconda prompt.
This is what I have done. Spyder crashes each time i start i. The error starts with 'Spyder crashed during last session' and then asks me to reset settings which I tried but does not work . Then I consulted the Troubleshooting Guide as provided in the error window and tried to update the software, restart the computer etc. but still with no avail.

spyder therein installed does not run

Like I told the last person above, you're going to have to give us a lot information in order for us to provide any useful help:

  • What is your operating system and Python version?
  • How are you trying to launch it (shortcut, Navigator, command line)?
  • What precise behavior occurs when you try to launch it? If any error messages appear, paste the exact text here.
  • Have you tried the steps in our official Spyder Troubleshooting Guide, specifically the Basic First Aid and Emergency CPR sections, which resolve the great majority of Spyder installation issues?
BezukhovA
@BezukhovA
May 06 00:55
Sorry of the repeated message.Just want to the situation clearer. I am using Windows 10 and at this stage only concerning with installation of Spyder. No python is installed sperately on the pc. I want to install Spyder through Anaconda. But 'conda' as a command cannot be recognized in Anaconda prompt with Anaconda installed from the official package. Through miniconda I managed to install Anaconda navigator where the associated Anaconda prompt allows me to issue 'conda install' and therefore got Spyder installed. However, it crashes each time I start it. The error asks to reset spyder; consult Troubleshooting Guides and search for bugs etc. I have tried every tip provided but none can work.
paulgureghian
@paulgureghian_gitlab
May 06 01:30
What is the difference between new 'file' and 'module' in Spyder ?
CAM Gerlach
@CAM-Gerlach
May 06 01:55

it starts to open what looks like the cmd.exe terminal then it closes.

@paulgureghian_gitlab This sounds like spyder-ide/spyder#9240 , and should be fixed in Spyder 3.3.5. Always remember to search our issue list for issues similar to what you reported, as usually (if the issue is on Spyder's side) someone else probably already reported it.

What is the difference between new 'file' and 'module' in Spyder ?

Where are you seeing a New module command? I don't see it either in Spyder 3.3.4 or Spyder 4 latest master, though I seem to remember one somewhere.

CAM Gerlach
@CAM-Gerlach
May 06 02:06

Yes. When you install Anaconda, it requests the installation of this package. Though provided as as optional, if not installed, Anaconda does not work.

You mean VSCode (a lightweight, extensible, open-source editor built on the Electron JS framework), a totally different application than Visual Studio (a proprietary/closed source, heavyweight IDE built in C++). VSCode is in no way required by Anaconda; Anaconda is a Python distribution that (due to Microsoft $$$) bundles the entirely separate VSCode application. If by some extremely esoteric bug not installing VSCode causes problems with Anaconda (I'm not sure how its even possible; they are totally seperate), that should be reported to the Anaconda team.

I used Anaconda to install Spyder. 'Conda' was not recognized as a valid command in Anaconda prompt.

Then something is very wrong with your Anaconda prompt (as the entire point of it is to be able to use conda), most likely due to a problem with your Anaconda install. You should do a clean uninstall and reinstall and if that doesn't fix it, look into Anaconda resources for more help.

This is what I have done. Spyder crashes each time i start i.

Given what you reported (conda not working in the Anaconda prompt, etc) something sounds really wrong with your Anaconda install, and the problem is much bigger than Spyder itself. Again, a full reinstall of Anaconda is all I can suggest; if that doesn't work try temporarily disabling any security, antivirus, firewall, etc. software that may be interfering, or it could be something else specific to your machine.

Through miniconda I managed to install Anaconda navigator where the associated Anaconda prompt allows me to issue 'conda install' and therefore got Spyder installed

Miniconda comes with Anaconda prompt already, which is unrelated to Anaconda Navigator. Again, installing that was not necessary, it is just a GUI shell around conda (which is basically what Miniconda installs) and seems to be a common source of problems.

However, it crashes each time I start it.

Again, How are you trying to launch it (shortcut, Navigator, command line)? Try launching it from the shortcut, or the Anaconda prompt. If you still get crashes, run set SPYDER_DEBUG=3 and paste any and all output in a code block (``` above and below) here. If you don't see any output, run conda install pyqt and try again, otherwise paste exactly what error message you see. Thanks.

@BezukhovA

@paulgureghian_gitlab Ah, I assume you mean the New Module and New file found in the File Explorer. Again, let me remind you to Please be as specific and detailed as possible when asking questions about Spyder as otherwise it can be very difficult, tedious and time consuming to figure out what you mean and help you. Thanks.

In any case, to answer your question, New file just creates a blank file with no default extension, while New Module creates a file with a .py extension and the New filetemplate that you see when pressing File -> New file. You can see the difference readily if you just try one and the other.

dollymeenak
@dollymeenak
May 06 14:23
HI
Does anyone knows how to debug the python code in spyder
CAM Gerlach
@CAM-Gerlach
May 06 15:34
@dollymeenak ...
Please remember to check the docs or do a simple Google search next time to get your answer far quicker and more efficiently.
BezukhovA
@BezukhovA
May 06 23:25
@CAM-Gerlach Thanks for the help. I have tried to launch spyder from Anaconda prompt as well as through the shortcut. I have also tried to conda uninstall and install Spyder several times as well as conda update all etc. But neither works. After issuing the command set SPYDER_DEBUG=3 I tried to run Spyder from the Anaconda prompt again, here is the error message I got"Start of MainWindow constructor
appusermodelid: 0
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...
Traceback (most recent call last):
File "C:\Users\wenxuli\miniconda3\lib\site-packages\spyder\app\mainwindow.py", line 3285, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\wenxuli\miniconda3\lib\site-packages\spyder\app\mainwindow.py", line 3140, in run_spyder
main.setup()
File "C:\Users\wenxuli\miniconda3\lib\site-packages\spyder\app\mainwindow.py", line 844, in setup
from spyder.plugins.editor import Editor
File "C:\Users\wenxuli\miniconda3\lib\site-packages\spyder\plugins\editor.py", line 41, in <module>
from spyder.utils.introspection.manager import IntrospectionManager
File "C:\Users\wenxuli\miniconda3\lib\site-packages\spyder\utils\introspection\manager.py", line 21, in <module>
from spyder.utils.introspection.plugin_client import PluginClient
File "C:\Users\wenxuli\miniconda3\lib\site-packages\spyder\utils\introspection\plugin_client.py", line 18, in <module>
import zmq
File "C:\Python36\Lib\site-packages\zmq__init.py", line 34, in <module>
from zmq import backend
File "C:\Python36\Lib\site-packages\zmq\backend\
init.py", line 40, in <module>
reraise(*exc_info)
File "C:\Python36\Lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Python36\Lib\site-packages\zmq\backend\
init.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Python36\Lib\site-packages\zmq\backend\select.py", line 26, in select_backend
mod =
import(name, fromlist=public_api)
File "C:\Python36\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:\Python36\Lib\site-packages\zmq\backend\cython\
init__.py)
[10888:8576:0507/092020.153:ERROR:broker_win.cc(59)] Error reading broker pipe: The pipe has been ended. (0x6D)"
CAM Gerlach
@CAM-Gerlach
May 06 23:36

conda update all

You should not do this unless you are instructed to, as it sometimes can cause dependency conflicts and other issues.