Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spyder 3 "Set Console Working Directory" not working

I've been using Spyder 2 as my default Python IDE for a couple of years already, and while preparing a class on Signal Processing I've stumbled upon the new Spyder 3 on Anaconda and decided to see what it looks like.

First, I've updated the Anaconda distribution on my Ubuntu 16.04 office computer to the newest version (i.e. I had a previous version already installed), and then got quite surprised when the button for "Set Console Working Directory" on the File Explorer (top right, between the "folder" icon and the "up arrow" icon) was missing. I can still change the working directory manually on the IPython console, but it's impractical and certainly won't motivate the students!

Thinking it could be a bug with the conda update, I've then decided to give it a go at downloading and installing the Anaconda for Windows on my home laptop (which is probably what most of the students will do), and it also does not have the "Set Console Working Directory" button.

By then I was thinking the new Spyder version might have abandoned it, but strangely enough, the Spyder GitHub page has a screenshot of the new Spyder 3 that HAS this exact same button (again: top right, between the "folder" icon and the "up arrow" icon)!

EDIT: here's a screenshot of how my Spyder looks like in Windows (the big red arrow is pointing towards where the icon should be):

enter image description here

Does anyone knows if there is a setting option that hides the "Set console working directory" button, or if this is a bug in the more recent Anaconda version that doesn't show it?

like image 411
fabio_hirono Avatar asked Oct 06 '16 20:10

fabio_hirono


People also ask

How do I change the working directory in Python?

To change the current working directory in Python, use the chdir() method. The method accepts one argument, the path to the directory to which you want to change.

How do you use the Console on Spyder?

Spyder can launch new IPython instances itself, through “Open an IPython console” under the Consoles menu, the IPython Console pane menu or its context menu ( Ctrl - T by default), to take advantage of the full suite of Spyder's features.


1 Answers

Answering my own question: I've contacted the Spyder developers, and this is "half a bug" :P (my choice of words).

Let me explain:

  • The intended functionality for Spyder 3 is to automatically change the console working directory when navigating through the file explorer, therefore the lack of the old button is intentional and is not a bug;

  • However, this new functionality is not working at the moment, which is a bug :P

The good news is that this will be fixed for Spyder 3.0.2, which should be out in a few days :)

(I've also been told that Anaconda usually takes a few days to add new versions in their repositories, so it might take a short while until we're able to update Spyder through conda)

like image 87
fabio_hirono Avatar answered Sep 28 '22 05:09

fabio_hirono