Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

jupyter notebook change default directory

'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.'
Source by www.planetofbits.com #
 
PREVIOUS NEXT
Tagged: #jupyter #notebook #change #default #directory
ADD COMMENT
Topic
Name
8+6 =