26

I'm using Debian. I installed Python 3.2.3. The path of Python 3 is /usr/bin/python3. How do I change it in Spyder?

Mark Hildreth
  • 42,023
  • 11
  • 120
  • 109
Joyfulgrind
  • 2,762
  • 8
  • 34
  • 41

5 Answers5

37

Press CTRL+SHIFT+ALT+P to open the Preferences window. Within this window, select the Console item on the left, then the Advanced Settings tab. The path to the Python executable will be right there.

Update:

For later versions please navigate to Tools -> Preferences -> Python Interpretor

Additionally, you might also need to follow an additional step to install the "spyder-kernels" library in python for which you have set the path using pip install spyder-kernels before restarting Spyder.

skt7
  • 1,197
  • 8
  • 21
HerrKaputt
  • 2,594
  • 18
  • 17
  • 2
    Does not work for me: `An error ocurred while starting the kernel Either: Your IPython frontend and kernel versions are incompatible or You don't have IPython installed in your external interpreter. In any case, we're sorry but we can't create a console for you.` Any other solution? I've tried Python 3.6.1 from anaconda3. – Aleksey Kontsevich Apr 04 '17 at 23:26
3

With Spyder v. 4.2.5 that comes with Anaconda3 v. 4.10.1, I do not see 'Console' on the left in the Preferences menu (i.e. Tools>Preferences). In this version you can change the path to the python.exe file under Python interpreter on the left.

enter image description here

Pfalbaum
  • 586
  • 3
  • 10
  • 26
1

I was having this problem after downloading a new version of Python and trying to use it in my Spyder without Anaconda installed.

Besides changing the path to the python.exe file under Python interpreter on the left as mentioned above by @HerrKaputt and @Pfalbaum. I had to install the spyder-kernels in the new python.

This can be done by running the following command in the cmd-pront (in my case i dont use Anaconda):

pip install spyder-kernels==2.3.*

If your python is installed in the anaconda. You can try this: Spyder, spyder-kernels and python version compatibilities?

Iuri
  • 31
  • 3
-1

simple if your not able to change the working directory .Press CTRL+SHIFT+ALT+P to open the Preferences window then go to RUN then see the working directory options and finally press the option THE CURRENT WORKING DIRECTORY.

Rahul Sarkar
  • 7
  • 1
  • 3
-1

Execute the following command: %cd"P:\Python"