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 will not launch with Python 2.7

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

I have to use Python 2.7 due to a required python module ‘arcPy’ for my code that due to my ArcGIS copy (version 10) I can not update. I have created a new environment via conda with python 2.7. When I try to install the latest version of Spyder it does not work. If I install a version ❤️.2.5 I can get Spyder installed, but then it will not launch. I reset Spyder and it still will not launch.

What steps reproduce the problem?

  1. Uninstall and Reinstall Anaconda
  2. Install Spyder 3.2.4 via conda
  3. Launch Spyder via command prompt or the Anaconda Navigator

What is the expected output? What do you see instead?

The expected output is Spyder launches and opens. I see instead Spyder attempt to open and then crash.

Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE Traceback (most recent call last): File “C:\Users\ljansen-admin.ESM-SB1-314-JB\Desktop\ANAconda\envs\py2\Scripts\spyder-script.py”, line 3, in import spyder.app.start File “C:\Users\ljansen-admin.ESM-SB1-314-JB\Desktop\ANAconda\envs\py2\lib\site-packages\spyder\app\start.py”, line 26, in from spyder.config.base import get_conf_path, running_in_mac_app File “C:\Users\ljansen-admin.ESM-SB1-314-JB\Desktop\ANAconda\envs\py2\lib\site-packages\spyder\config\base.py”, line 362, in _ = get_translation(“spyder”) File “C:\Users\ljansen-admin.ESM-SB1-314-JB\Desktop\ANAconda\envs\py2\lib\site-packages\spyder\config\base.py”, line 334, in get_translation language = load_lang_conf() File “C:\Users\ljansen-admin.ESM-SB1-314-JB\Desktop\ANAconda\envs\py2\lib\site-packages\spyder\config\base.py”, line 315, in load_lang_conf lang = get_interface_language() File “C:\Users\ljansen-admin.ESM-SB1-314-JB\Desktop\ANAconda\envs\py2\lib\site-packages\spyder\config\base.py”, line 286, in get_interface_language spyder_languages = get_available_translations() File “C:\Users\ljansen-admin.ESM-SB1-314-JB\Desktop\ANAconda\envs\py2\lib\site-packages\spyder\config\base.py”, line 257, in get_available_translations error = ('Update LANGUAGE_CODES (inside config/base.py) if a new ’ NameError: global name '’ is not defined

Versions

  • Spyder version: 3.2.4
  • Python version: 2.7.15
  • Qt version: 5.6.2
  • PyQt version: 5.6.0
  • Operating System name/version: Windows 10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
steff456commented, Aug 10, 2020

Hi @larajan67,

You have multiple options:

  1. Create a conda environment with Spyder 3.3.6, which is the stable version for Spyder 3 that supports Python 2.
  2. Create a conda environment with Spyder 4.0.1, which is the last Spyder version that has all packages for Python 2. The downside of this option is that it may include multiple bugs that we have fixed during this year.
  3. Create a conda environment with Python 3 and Spyder 4.1.4, and another environment with Python 2 with conda installation and install in this second environment spyder-kernels with pip, which we explain in the second part of the following video https://www.youtube.com/watch?v=Ul79ihg41Rs&t

If you want to continue using Python 2 in your code, the last option is the more viable alternative, even though the first one is pretty usefull but remember that we are not fixing Spyder 3 bugs anymore.

I will highly recommend you to start migrating your code to Python 3 because since December of the last year there’s no more support for Python 2 and a lot of projects are not longer providing code so it will be even harder to continue working on Python 2 as time pass by.

Please let me know if this helps you and thanks reporting!

2reactions
asanganuwancommented, Jan 5, 2021

Found a workaround to use Spyder on python 2.7.

  1. setup two virtual environments for Python 2.7 and 3.6.
  2. Launce anaconda navigator and install spyder 3.3.6 on both the environments
  3. Launch spyder on the environment with Python 3.6
  4. Preferences–>Python Interpreter --> set the Python path for 2.7
  5. Restart Spyder Done!
Read more comments on GitHub >

github_iconTop Results From Across the Web

Python 2.7 with Spyder 3.0 - Stack Overflow
1 Answer 1 · 1) install python 2.7 · 2) run python2.7 -m pip install spyder in cmd · 3) you should find...
Read more >
Frequently Asked Questions — Spyder 5 documentation
Help! First, make sure the error you are seeing is not a bug in your code. To confirm this, try running it in...
Read more >
Install Spyder for Python 2.7 without Anaconda? - Reddit
I'm trying to install Spyder for Python 2.7, I don't like the Anaconda process because it won't let me set a Spyder launch...
Read more >
Spyder crashes at launch: "python.exe has stopped working"
dprice · 1. Uninstalling and reinstalling · 2. Resetting spyder (spyder --reset) · 3. deleting the .spyder2 directory · 4. changing the spyder...
Read more >
Installing Python and Spyder | CADS - Miami University
Windows Users · Step 1: Go to the Anaconda downloads page and download PYTHON 2.7. · Step 2: After you download the most...
Read more >

github_iconTop Related Medium Post

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