Changing to python2.7 interpreter in Spyder3
See original GitHub issueI have uninstalled Spyder2 and installed Spyder3. I was told that it would be easy to continue using the python2.7 interpreter in the new Spyder3. I changed the interpreter using Preferences > Console > Advanced settings > Use the following Python interpreter: changing this to /usr/bin/python2.7. It comes up with a warning:
You selected a Python 2 interpreter for the console but Spyder is running on Python 3!.
Although this is possible, we recommend you to install and run Spyder directly with your selected interpreter, to avoid seeing false warnings and errors due to the incompatible syntax between these two Python versions.
I left the default PYTHONSTARTUP option.
Upon choosing to open a new python console I get the following which is correct:
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Upon restarting the IPython console/kernel I get the following message:
An error ocurred while starting the kernel
Traceback (most recent call last):
File "/usr/lib/python3/dist‑packages/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 186, in
ipk_temp.config = kernel_config()
File "/usr/lib/python3/dist‑packages/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 45, in kernel_config
from spyderlib.config import CONF
ImportError: No module named spyderlib.config
When I switch to the Python console and run my script I get the following message:
runfile('blablabla.../RT_param_compare.py', wdir=r'blablabla...')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'runfile' is not defined
I am not sure what I should do to remedy this.
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
How to change python version in anaconda spyder
keyboard shortcut Ctrl + Alt + Shift + P; Tools -> Preferences. And depending on the Spyder version you can change the interpreter...
Read more >How to change the Python version in Spider
By “Spider”, I hope you meant Spyder IDE, To change the Python version . Go to Preferences in your IDE or hit CTRL+SHIFT+ALT+P....
Read more >Changing python interpreter in spyder
So I've changed the interpreter in spyder using Preferences > Console > Advanced settings > Use the following Python interpreter: /opt/local/bin ...
Read more >How to set python interpreter in spyder with python ... - YouTube
In this video I am going to show how to set python interpreter in spyder with python 3.9.* virtual environment in Windows 10Thank...
Read more >Switching between Python 2 and Python 3 environments
Create a Python 2 environment named py2, install Python 2.7: · Create a new environment named py3, install Python 3.5: · Activate and...
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 found this one useful for anaconda:
Try typing these 3 lines from the anaconda command prompt: conda create -n spyder python=2.7 spyder conda activate spyder spyder
Yes sorry it should be source activate spyder
After activating Use conda or pip to install other libraries…