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 within Python 2.7 Anaconda environment crashes

See original GitHub issue

Issue 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 (or pip, 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.

Spyder_3 2 8Crash_Screenshot

From the base Python environment (Python 3.8.3) Spyder 4.1.4 (default version) can be successfully launched.

What steps reproduce the problem?

  1. Download and install latest Anaconda3 from https://www.anaconda.com/products/individual
  2. Launch Navigator
  3. Launch conda Cmd.exe
  4. “conda create -n py2_7 python=2.7”
  5. Exit Anaconda3 Navigator, then re-execute.
  6. Switch to “py2_7” via “Applications on” pull-down within Navigator.
  7. Install Spyder (tried default version 4.1.4, 3.2.8, and 3.2.3)
  8. 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.

  1. “spyder --reset”.
  2. Removal of non-base environments via “conda remove” in CMD.exe Prompt, then reinstalling Anaconda from scratch.
  3. From CMD.exe Prompt, uninstall then reinstall Spyder (“conda uninstall” and “conda install”. Uninstall and re-install are without error, but Spyder still crashes.
  4. 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:

  1. (execution from Navigator) Error dialog previously attached.
  2. (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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
XingLiangLondoncommented, Jun 5, 2021

I installed qtawesome 0.7.3 as mentioned by @ccordoba12:

conda install -c conda-forge qtawesome-0.7.3-pyh9f0ad1d_0.tar.bz2

(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)

1reaction
ccordoba12commented, Oct 12, 2020

File “C:\Users\micha\anaconda3\envs\py2_7\lib\site-packages\qtawesome\iconic_font.py”, line 206, in init super().init()

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.

Read more comments on GitHub >

github_iconTop 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 >

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