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.

Error when changing the Python interpreter to Python 2

See original GitHub issue

Description

I want to change the python interpreter to python2.However, an error occurred after setting.Specific steps are as follows: step 1.choose ‘Preference’ -> ‘Python interpreter’ step 2.change the python interpreter to python2 and click the button named ‘Apply’ or ‘OK’

Traceback

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\preferences\configdialog.py", line 236, in button_clicked
    configpage.apply_changes()
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\preferences\configdialog.py", line 99, in apply_changes
    self.apply_callback()
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\preferences\configdialog.py", line 282, in <lambda>
    self.apply_settings(self.changed_options))
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\preferences\maininterpreter.py", line 257, in apply_settings
    change = self.python_executable_changed(executable)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\preferences\maininterpreter.py", line 161, in python_executable_changed
    not self.warn_python_compatibility(pyexec)):
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\preferences\maininterpreter.py", line 190, in warn_python_compatibility
    ) % (console_version, spyder_version), QMessageBox.Ok)
TypeError: not all arguments converted during string formatting

Versions

  • Spyder version: 4.0.1
  • Python version: 3.7.4
  • Qt version: 5.12.2
  • PyQt5 version: 5.12.1
  • Operating System: Windows 7

Dependencies

atomicwrites >=1.2.0         :  1.3.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
cloudpickle >=0.5.0          :  1.2.2 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
intervaltree                 :  None (OK)
IPython >=4.0                :  7.8.0 (OK)
jedi =0.14.1                 :  0.14.1 (OK)
nbconvert >=4.0              :  5.6.0 (OK)
numpydoc >=0.6.0             :  0.9.1 (OK)
pexpect >=4.4.0              :  4.8.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
psutil >=0.3                 :  5.6.3 (OK)
pygments >=2.0               :  2.4.2 (OK)
pylint >=0.25                :  2.4.2 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.7 (OK)
zmq >=17                     :  18.1.0 (OK)
qdarkstyle >=2.7             :  2.8 (OK)
qtawesome >=0.5.7            :  0.6.0 (OK)
qtconsole >=4.6.0            :  4.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
rtree >=0.8.3                :  0.9.3 (OK)
sphinx >=0.6.6               :  2.2.0 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
watchdog                     :  None (OK)
cython >=0.21                :  0.29.13 (OK)
matplotlib >=2.0.0           :  3.1.1 (OK)
numpy >=1.7                  :  1.16.5 (OK)
pandas >=0.13.1              :  0.25.1 (OK)
scipy >=0.17.0               :  1.3.1 (OK)
sympy >=0.7.3                :  1.4 (OK)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
PrinceFPFcommented, Feb 12, 2020

@goanpeca Thank you very much. According to your suggestion, I have solved my doubts.

2reactions
PrinceFPFcommented, Feb 12, 2020

@goanpeca @dalthviz @ccordoba12 @maraigue Thank you very much for your help. According to your suggestions, I have temporarily switched the IDE environment to English. I look forward to future updates and fixes this BUG. I also look forward to spyder IDE getting better and better in the future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure a Python interpreter | PyCharm Documentation
Press Ctrl+Alt+S to open the IDE settings and select Project <project name> | Python Interpreter. · Expand the list of the available interpreters ......
Read more >
Error: A Python Interpreter Could not be Loaded
The current solution involves opening FME Workbench > Tools > FME Options > Translation. If you select the Dropdown menu for the Preferred ......
Read more >
ImportError when changing Python interpreter
So, in PyCharm, I specified the interpreter path to be /usr/bin/python3.4 . However, when I run the same file, I now get the...
Read more >
Porting Python 2 Code to Python 3
While you can make Python 2.5 work with Python 3, it is much easier if you only have to work with Python 2.7....
Read more >
How to Change Python Version in Visual Studio Code
Shorts # python #pythonprogramming #python3 Hey guys so you ever get ModuleNotFoundError in Python even after installing a module?
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