Spyder within Python 2.7 Anaconda environment crashes
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole
(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset
- Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
Platform - HP Envy, 10th Gen Intel i7, Windows 10 Pro 1909 64-bit.
After from-scratch reinstall of Anaconda3 1.9.12 Navigator (in hopes of clearing the Spyder IDE issues), created a Python 2.7 virtual environment using Anaconda Cmd.exe (conda) prompt. Installed both Spyder 4.1.4 (default) as well as rolled back to Spyder 3.2.8 and 3.2.3 (earliest I can go) - all have same behavior within the Python 2.7 virtual environment - Spyder fails to start and get the dialog box shown in the attachment below.
From the base Python environment (Python 3.8.3) Spyder 4.1.4 (default version) can be successfully launched.
What steps reproduce the problem?
- Download and install latest Anaconda3 from https://www.anaconda.com/products/individual
- Launch Navigator
- Launch conda Cmd.exe
- “conda create -n py2_7 python=2.7”
- Exit Anaconda3 Navigator, then re-execute.
- Switch to “py2_7” via “Applications on” pull-down within Navigator.
- Install Spyder (tried default version 4.1.4, 3.2.8, and 3.2.3)
- Launch Spyder (any of the versions mentioned in step 7) - get aforementioned dialog, i.e. “Spyder crashed during last session”.
Things tried but issue still persists.
- “spyder --reset”.
- Removal of non-base environments via “conda remove” in CMD.exe Prompt, then reinstalling Anaconda from scratch.
- From CMD.exe Prompt, uninstall then reinstall Spyder (“conda uninstall” and “conda install”. Uninstall and re-install are without error, but Spyder still crashes.
- After creating the “py2_7” environment, “conda activate py2_7” then run Spyder from command line. Get traceback shown in traceback section.
What is the expected output? What do you see instead?
I expect to see the Spyder IDE open. What I see instead is either:
- (execution from Navigator) Error dialog previously attached.
- (execution from CMD.exe conda console) Traceback as shown below.
Paste Traceback/Error Below (if applicable)
Microsoft Windows [Version 10.0.18363.1082]
(c) 2019 Microsoft Corporation. All rights reserved.
(py2_7) C:\Users\micha>spyder --show-console
(Deprecated) --show console does nothing, now the default behavior is to show the console, use --hide-console if you want to hide it
Traceback (most recent call last):
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\app\mainwindow.py", line 3208, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\app\mainwindow.py", line 3082, in run_spyder
main = MainWindow(options)
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\app\mainwindow.py", line 373, in __init__
from spyder.plugins.shortcuts import ShortcutsConfigPage
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\plugins\shortcuts.py", line 835, in <module>
class ShortcutsConfigPage(GeneralConfigPage):
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\plugins\shortcuts.py", line 839, in ShortcutsConfigPage
ICON = ima.icon('keyboard')
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\utils\icon_manager.py", line 267, in icon
directory=_resource['directory'])
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\qtawesome\__init__.py", line 178, in load_font
return _instance().load_font(prefix, ttf_filename, charmap_filename, directory)
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\qtawesome\__init__.py", line 54, in _instance
'materialdesignicons-webfont-charmap.json')
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\qtawesome\iconic_font.py", line 206, in __init__
super().__init__()
TypeError: super() takes at least 1 argument (0 given)
(py2_7) C:\Users\micha>spyder --reset
*** Reset Spyder settings to defaults ***
removing: C:\Users\micha\.spyder\spyder.ini
removing: C:\Users\micha\.spyder\langconfig
removing: C:\Users\micha\.spyder\spyder.lock
(py2_7) C:\Users\micha>spyder --show-console
(Deprecated) --show console does nothing, now the default behavior is to show the console, use --hide-console if you want to hide it
Traceback (most recent call last):
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\app\mainwindow.py", line 3208, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\app\mainwindow.py", line 3082, in run_spyder
main = MainWindow(options)
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\app\mainwindow.py", line 373, in __init__
from spyder.plugins.shortcuts import ShortcutsConfigPage
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\plugins\shortcuts.py", line 835, in <module>
class ShortcutsConfigPage(GeneralConfigPage):
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\plugins\shortcuts.py", line 839, in ShortcutsConfigPage
ICON = ima.icon('keyboard')
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\spyder\utils\icon_manager.py", line 267, in icon
directory=_resource['directory'])
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\qtawesome\__init__.py", line 178, in load_font
return _instance().load_font(prefix, ttf_filename, charmap_filename, directory)
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\qtawesome\__init__.py", line 54, in _instance
'materialdesignicons-webfont-charmap.json')
File "C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\qtawesome\iconic_font.py", line 206, in __init__
super().__init__()
TypeError: super() takes at least 1 argument (0 given)
Versions
- Spyder version: 4.1.4, 3.2.8, 3.2.3
- Python version: 2.7.18
- Qt version:
- PyQt version:
- Operating System name/version: Windows 10 Pro x64 1909
Dependencies
Spyder crashes in py2_7 environment so can't get to the Dependencies listing.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Spyder keeps crashing during load in all Anaconda environment
This started happening after I reinstalled the package "pydicom" in the environment, and now nothing works. I have reinstalled anaconda2, used ...
Read more >Troubleshooting — Anaconda documentation
Clear all PATHs related to Python in sysdm.cpl file. ... Run conda info -e to list the environments created in the previous installation...
Read more >Spyder crashes at launch: "python.exe has stopped working"
I launch spyder from: 1. The Spyder Windows icon 2. From the windows command prompt 3. From the Anaconda command prompt 4. From...
Read more >spyder-ide/public - Gitter
Ehmmm,I can upgrade it with new environment in Anaconda right? ... Then, if you really need a Python 2.7 environment for some reason,...
Read more >Common Illnesses — Spyder 5 documentation
It is included by default with Anaconda, but if you want to run your code in another Python environment or installation, you'll need...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I installed qtawesome 0.7.3 as mentioned by @ccordoba12:
(the file can be downloaded from https://anaconda.org/conda-forge/qtawesome/files)
Then, downgrade Spyder to version 3.3.6 works for me (From Anaconda Navigator ->Home->Spyder, click Install specific version and choose 3.3.6)
Hey @mfogle, thanks for reporting. You need to install QtAwesome 0.7.3 to fix this error for now, but as @steff456 said, it’s harder and harder for us to support Python 2. So please consider to move to Python 3 as soon as possible.