SPYDER_DEBUG=3 is failing on Windows
See original GitHub issueDescription of your problem
What steps will reproduce the problem?
- Updated to 3.2 through “conda update --all”
- Open Spyder and try to run any script through F5
- Executed spyder --reset and spyder --default
- Also tried “conda uninstall spyder” and then “conda install spyder”
- Also restarted PC
What is the expected output? What do you see instead? I expect the script to run, instead I get “NameError: name ‘runfile’ is not defined”
Please provide any additional information below "C:.…>set SPYDER_DEBUG=3 C:.…>spyder --show-console
Traceback (most recent call last): File “C:\Users\gabriel\Anaconda3\Scripts\spyder-script.py”, line 5, in <module> sys.exit(spyder.app.start.main()) File “C:\Users\gabriel\Anaconda3\lib\site-packages\spyder\app\start.py”, line 136, in main mainwindow.main() File “C:\Users\gabriel\Anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 3025, in main or options.optimize) File “C:\Users\gabriel\Anaconda3\lib\site-packages\spyder\utils\windows.py”, line 33, in set_attached_console_visible return bool(ShowWindow(console_window_handle, flag[state])) KeyError: 3"
Not sure if related but I also get this when updating/installing/uninstalling Spyder through conda " INFO menuinst_win32:init(182): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\Users\xyz\Anaconda3’, env_name: ‘None’, mode: ‘None’, used_mode: ‘user’ "
Versions and main components
- Spyder Version: 3.2.0
- Python Version: 3.6.2
- Qt Version: 5.6.2
- PyQt Version: 5.6.0
- Operating system: Windows 10 64 bits
Dependencies
Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
IPython >=4.0 : 6.1.0 (OK) cython >=0.21 : None (NOK) jedi >=0.9.0 : 0.10.2 (OK) nbconvert >=4.0 : 5.2.1 (OK) numpy >=1.7 : 1.13.1 (OK) pandas >=0.13.1 : 0.20.3 (OK) pycodestyle >=2.3: 2.3.1 (OK) pyflakes >=0.6.0 : 1.5.0 (OK) pygments >=2.0 : 2.2.0 (OK) pylint >=0.25 : 1.6.4 (OK) qtconsole >=4.2.0: 4.3.0 (OK) rope >=0.9.4 : 0.9.4-1 (OK) sphinx >=0.6.6 : 1.6.2 (OK) sympy >=0.7.3 : 1.1 (OK)
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (7 by maintainers)

Top Related StackOverflow Question
@dalthviz, I think @gabrielclow last comment provided a way to reproduce this problem. Please create a new conda environment and install Anaconda there, like this
Then run in that env
and see if you can run scripts in Spyder or not.
@dalthviz, please work on this one.