I have started learning - Machine learning course on Windows OS. Whenever I start a new instance of Spyder 3.2.4(Python 3.6) & RStudio(1.1.383), every time I need to set
In Spyder (since version 3.2) you need to go to
Tools > Preferences > Current working directory
and select the option called
the following directory
In Spyder whenever you run your script for the first time it will go to current directory automatically. You just have to run for the first time. Make sure you have selected
Tools > Preferences > Current working directory
For Mac:
Click "python" in top left corner.
Click preferences.
Current working directory.
Boom.
To set working directory permanently in: 1. Spyder IDE: Tools > Prefeences > Current working directory > the following directory 2. RStudio IDE: Tools > Global Options... > General > Default working directory (when not in a project)
PS: Yes, we need to restart the application in both IDEs to take changes in effect.