'Important note:'
This fix only applies if you are using Anaconda to start Juypter Notebook.
'Steps:'
'1: Open Anaconda Navigator'
'2: Click the Environments tab on the left side'
'''3: Next to "base (root)" should be a green play button,
click that followed by "Open Terminal" '''
'4: In the terminal that opens, run these commands:'
jupyter notebook --generate-config
notepad %userprofile%.jupyterjupyter_notebook_config.py
'5: Notepad should open, press CTRL+F and search for this:'
c.NotebookApp.notebook_dir
'''6: Un-comment the line, then place the path you want to use inside the quotes'
NOTE: Replace any back slashes with forward slashes!'
Example: '''
c.NotebookApp.notebook_dir = 'C:/Users/cloud/Documents/Jupyter Notebooks'
'7: Save the file and restart Anaconda Navigator, closing Notebook if prompted.'
import os
os.getcwd()
Out[2]:
'/tmp'
In [3]:
os.chdir('/')
In [4]:
os.getcwd()
Out[4]:
'/'
In [ ]:
%cd "C:abcxyz"