Spyder 3 “Set Console Working Directory” button missing

8,001 views
Skip to first unread message

fchi...@gmail.com

unread,
Oct 18, 2016, 3:23:05 PM10/18/16
to spyder
Hi all,

I'm not sure if this is an issue with Spyder or with Anaconda, but here it goes; I raised this same question on Stack Overflow a few days ago, so I'm just gonna copy the same text here.

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).

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?

Many thanks!

Jitse Niesen

unread,
Oct 19, 2016, 1:00:25 PM10/19/16
to spyder
Hello,

With Spyder 3, the directory in the IPython console is automatically updated after you change the directory in the toolbar (to the left of the "folder" icon). The "Set Console Working Directory" was then removed because it was not so useful. Does that make sense to you? It's important to me that Spyder is reasonably intuitive especially for beginners.

There is some discussion at https://github.com/spyder-ide/spyder/issues/2910 .

The screenshot on the Spyder GitHub page does not show Spyder 3. I guess we should update it.

Hope this helps,
Jitse

fchi...@gmail.com

unread,
Oct 19, 2016, 1:54:01 PM10/19/16
to spyder
Hi Jitse,

Thank you for your reply and the link with the discussion; it does clarify things, and the new behaviour does makes sense - except that it doesn't work on my Spyder installations :P

I've just tried changing the directory on my office machine (Ubuntu 16.04) and on my personal laptop (Win 8), both running Spyder from a reasonably recent Anaconda install; on both systems I tried changing the working directory through the file explorer inside Spyder and checking for corresponding changes on the console using "%pwd", but on neither system the output of "%pwd" changed from the starting folder to the folder set through the file explorer. I should also mention that the output of "%pwd" seems to be the correct one; I told Python to create a simple figure and save it, and the figure was saved in that directory (and not the one shown in the file explorer). Strangely enough, however, I can successfully change the working folder through the console using "cd" on both systems; not ideal for teaching, but at least it still works!

I'd be grateful if other people could confirm if this affects them as well; in any case, we have another class on Friday and I can also test the University computers to see if this bug affects them too. Please let me know if there are any other tests you'd like me to do!

Many thanks :)
Fabio

Carlos Córdoba

unread,
Oct 19, 2016, 8:20:23 PM10/19/16
to spyd...@googlegroups.com
Hi Fabio,

I can confirm this is a bug, and I'm very sorry for it!

As part of a big refactoring we did to improve how Spyder is connected to our IPython consoles, I forgot to reconnect the Working Directory toolbar to them. I opened an issue about it

https://github.com/spyder-ide/spyder/issues/3561

which I plan to fix this weekend and release it in 3.0.2 next week.


Cheers,
Carlos

El 19/10/16 a las 12:45, fchi...@gmail.com escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

fchi...@gmail.com

unread,
Oct 20, 2016, 10:27:58 AM10/20/16
to spyder
Hi Carlos,

No worries about it :) Considering the amazing job you guys do with Spyder, this is a very, very minor problem. Looking forward to the next update!

Many thanks,
Fabio

fchi...@gmail.com

unread,
Jan 9, 2017, 11:16:33 AM1/9/17
to spyder
Hi all,

So, slightly related issue: now the IPython console working directory updates automatically when I change the directory in the toolbar, which is great! However, when I use the "file explorer" tab to navigate the file structure in the computer, even though I can see the directory changing in the toolbar as I navigate, the actual IPython console working directory does not change (which can be checked using "%pwd"). I assume both of them were meant to change the working directory as you browse the file structure, so perhaps there's another missing connection there?

One more thing: I've also noted that any working directory changes made in the console using "cd" are not automatically reflected neither in the file explorer nor in the toolbar. I'm not complaining about it, it's just that I'm not sure if this is meant to work as it is and I thought I'd mention it in any case :P

As usual, many thanks for your great work! :)


Cheers,
Fabio

Scott Forney

unread,
Jan 15, 2017, 2:32:49 PM1/15/17
to spyder
This is not my experience Jitse.

If I use the bold folder and up-arrow icons



to change the path, the working directory changes with it. 

But if I select folders in the file explorer or use the small up-arrow icons



to change the path, the working directory does not follow.

Just updated to Spyder 3.0.2

Carlos Córdoba

unread,
Jan 15, 2017, 2:34:28 PM1/15/17
to spyd...@googlegroups.com
Hi,

That's true, we don't change the working directory when browsing in the File Explorer. Why do you need that?


Cheers,
Carlos

El 15/01/17 a las 10:02, Scott Forney escribió:
--

fchi...@gmail.com

unread,
Jan 18, 2017, 9:50:17 PM1/18/17
to spyder
Personally, I think it's easier to navigate and change the directory using the File Explorer than the toolbar; besides, I find it's a bit counter intuitive to have changes in one mirrored by changes in the other going both ways, but at the same time have changes in the working directory working only when you change the toolbar.

Having said that, I'm fine just knowing that it's meant to work as it is :P it's just my intuition that expected something different. Thanks for the clarification anyway!

Cheers,
Fabio

Dan Codiga

unread,
Jan 19, 2017, 9:56:40 AM1/19/17
to spyder
Yes, a good complete explanation is helpful. Once one understands how it all functions, one can work with it.

But I agree it is pretty complicated and un-intuitive. And even having used Spyder for more than a year now, I still find myself getting confused and having to stop periodically and check that I am fully understanding what is going on. 

There are three directories involved:
1. Toolbar directory
2. Console working directory
3. Base directory of the File Explorer

On the one hand, the base of the File Explorer and the Toolbar always update to each other now, but on the other hand the console working directory changes to match the Toolbar only in response to a change initiated using the Toolbar. 

In other words when one changes the folder in the Toolbar, both the File Explorer and the console working directory update so that they are the same as the Toolbar-- BUT if one changes the folder in the File Explorer the Toolbar changes to match the File Explorer and the console working directory does NOT change. 

And meanwhile when the console working directory is changed using commands in the console, neither the Toolbar nor the File Explorer update or change.

Seems like it could all be arranged in a more intuitive way. Maybe the main uses/functions of each of the three directories should be spelled out and a new logic for how they relate to each other could be considered. Are all three necessary? If so some brief explanations of why would go a long way. If not, could the Toolbar be dropped? I don't know. 

For keeping all three, I tend to think that having the File Explorer independent from the other two, and have the other two (Toolbar and console working directory) always linked to each other (i.e. if you update one then the other automatically gets updated to match) would be a good configuration, if that was possible (it may not be).

Carlos Córdoba

unread,
Jan 19, 2017, 10:35:51 AM1/19/17
to spyd...@googlegroups.com
Hi Dan,

We were not aware this was confusing for our users. Please open a bug about this in our issue tracker so we can fix it for Spyder 3.2

I think the best solution is to maintain the three components in sync (file explorer, console and toolbar).


Cheers,
Carlos

El 19/01/17 a las 08:23, Dan Codiga escribió:

Dan Codiga

unread,
Jan 20, 2017, 9:46:14 AM1/20/17
to spyder
This is very closely related to the currently-open issue 3257 https://github.com/spyder-ide/spyder/issues/3257 .

I added a comment there pointing to this discussion here.

Hope this helps

Carlos Córdoba

unread,
Jan 20, 2017, 9:47:39 AM1/20/17
to spyd...@googlegroups.com
Yes, thanks. We'll work on this for Spyder 3.2.


Cheers,
Carlos

El 20/01/17 a las 09:39, Dan Codiga escribió:

Cole Trujillo

unread,
Aug 16, 2017, 6:17:16 PM8/16/17
to spyder
Hello, I have been using anaconda spyder for the mac and I have been having the same problem of not being able to set the console working directory as there is not a button to do so. Reading the comments it sounds like it automaticaly updates? How do I know if it has automatically udaped to the folder I wish it to be?

Carlos Córdoba

unread,
Aug 16, 2017, 6:21:14 PM8/16/17
to spyd...@googlegroups.com
You need to run

    pwd

in your current console.


Cheers,
Carlos

El 16/08/17 a las 15:19, Cole Trujillo escribió:
Hello, I have been using anaconda spyder for the mac and I have been having the same problem of not being able to set the console working directory as there is not a button to do so. Reading the comments it sounds like it automaticaly updates? How do I know if it has automatically udaped to the folder I wish it to be?
Reply all
Reply to author
Forward
0 new messages