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 my current working directory in these IDEs. Is there any way to set them pemanently?
In Python, you can get and change (set) the current working directory with os. getcwd() and os. chdir() . The os module is included in the standard library, so no additional installation is required.
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.
You can change working directory after opening Spyder by typing inside IPython console cd path/to/working/dir .
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.
In Spyder (since version 3.2) you need to go to
Tools > Preferences > Current working directory
and select the option called
the following directory
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With