How to change jupyter launch folder

I tried to follow the instructions given in the documentation for the Jupyter laptop .

Unfortunately, I could not figure it out. Where exactly is the "start in" field?

I have a Windows 7 (64-bit) system with Anaconda3 installed (not on C drive). I want to change the location of the Jupyter start folder.

+221
path jupyter-notebook jupyter anaconda
Feb 07 '16 at
source share
21 answers

cd to the directory or the parent directory (with the specified directory in which you will work in it).

Note that this is a folder ( E:\> --- This will not work)

Then just run the jupyter notebook command

+120
Sep 12 '16 at 15:28
source share

Use jupyter laptop configuration file:

Open cmd (or Anaconda Prompt) and run jupyter notebook --generate-config .

This writes the file to C:\Users\username\.jupyter\jupyter_notebook_config.py .

Find the location of the file and open it in the editor

Locate the following line in the file: #c.NotebookApp.notebook_dir = ''

Replace with c.NotebookApp.notebook_dir = '/the/path/to/home/folder/'

Make sure you use forward slashes in your path and use / home / user / instead of ~ / for your home directory, backslashes can be used if you put them in double quotes, even if the folder name contains spaces as such: "D:\yourUserName\Any Folder\More Folders\"

Remove # at the beginning of the line so the line can execute

+350
Nov 09 '16 at 19:51
source share

I am on Windows 10 but the same version of Anaconda.

  1. Click on the "Start" menu, then "All Programs" (only programs for Win10).
  2. Click on the Anaconda3 folder; my Anaconda3 (64-bit)
  3. There you should see a Jupyter Notebook. If you have a virtual environment installed, it will be followed by the environment name, for example: Jupyter Notebook (env)
  4. Right-click the Jupyter Notebook entry and go to Advanced => Open File Location
  5. Right-click on the correct Jupyter Notebook entry, then select Properties
  6. Enter the path in the "Start with:" field; if there are spaces in the path, you must enclose it in double quotes

User navigating to Anaconda3 folder (in Windows; in AppData), editing properties of "Jupyter Notebook" shortcut, to change its "Start in" command to point to a directory where you want Jupyter to start

+89
Apr 05 '16 at 17:41
source share

First try to run

jupyter notebook --notebook-dir='C:\Your\Desired\Start\Directory\'

on the command line (cmd) to see if the Jupyter notepad opens in the right place.

If so, then you can do this by:

  1. In Windows Explorer or on the desktop, right-click> New> Shortcut

  2. Enter the following location and click "Next":

jupyter notebook --notebook-dir='C:\Your\Desired\Start\Directory\'

  1. Enter a name for your shortcut and finish

You now have a shortcut to launch Jupyter in the right place. This works on Windows 7.

Please note that if you find an error saying that the jupyter notebook --notebook-dir='D:/' , try using a forward slash / instead of the backslash in the path, for example jupyter notebook --notebook-dir='D:/'

+50
Aug 04 '17 at 20:35 on
source share

I had the same problem and tested the methods mentioned above. After several tests, I realized that they are partially correct and are not a complete solution. I tested below on Windows 10 and Anaconda 4.4.0 using python 3.6.

There are two ways to do it, although they only have a very small difference. Follow the marneylc method suggested above: i.e.

1) Open "Anaconda Prompt" and enter jupyter notebook --generate-config

2) You find the file in C:\Users\username\.jupyter\jupyter_notebook_config.py

3) Change the line #c.NotebookApp.notebook_dir = '' to c.NotebookApp.notebook_dir = 'c:\test\your_root\'

4) Then go to the Jupyter Notebook shortcut located in C:\Users\User_name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit)

5) Right click and go to Properties

6) In the Target field Target delete %USERPROFILE% as stenlytw suggested above.

7) Then in the Start in field enter the same directory c:\test\your_root\ in jupyter_notebook_config.py

8) Done!

As an easier way, after step 3 go to C:\Users\User_name\Anaconda3\Scripts

4-2) You can see the jupyter-notebook.exe file and click it.

5-2) Then, Jupyter will launch the folder specified in jupyter_notebook_config.py . So make a shortcut to this file.

6-2) Done.

+34
Jun 09 '17 at 17:32
source share

You can change the configuration from the conda command line:

  • run anaconda command line
  • run jupyter notebook --generate-config
  • the .jupyter / directory should be created in your home with the jupyter_notebook_config.py file
  • uncomment and edit the c.NotebookApp.notebook_dir field

loan for Clement https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/gqRwT_SxGBw

+25
Dec 25 '16 at 13:38
source share

I am using Windows 7 (64 bit) with Anaconda2. From the Start menu, right-click Jupyter Notebook -> Properties . In the Target field Target change %USERPROFILE% to the new "D:\path" .

jupyter

+22
May 22 '17 at 4:35 a.m.
source share

So the answers given above helped, but please let me clarify this so that other people who are not very familiar with MS-Windows could solve this in the same way:

This issue occurs when Windows 10 installs Anaconda with Python, Ipython, and Jupyter Notebook.

First open the Anaconda prompt and enter the following line:

 jupyter notebook --generate-config 

You will get something like this: enter image description here

You no longer need to do anything on request. I did not take a snapshot of my full address due to privacy, but it shows something like:

 C:\Users\name\.jupyter 

Locate this folder on the C: drive and in this folder find the python jupyter_notebook_config.py file. Drag the file into Notepad ++ to edit it. When editing, look around line 214 to find a line that looks like this:

 #c.NotebookApp.notebook_dir = '' 

Uncomment it i.e. delete the "#" in the first column. Now add the address of our target folder to `` as follows:

 c.NotebookApp.notebook_dir = 'C:\\Users\\name\\Desktop\\foldername' 

Then save the file. Then open the anaconda prompt again, type jupyter notebook . This should launch Jupyter Notebook in a browser in the folder with the above address. Here, the key point is UNCOMMENT (which means deleting) # at the beginning of the line, and then USING \\ double slashes (for the path separator) between folders. If you use only one slash \, this will not work.

All this.

+17
Jul 16 '18 at 14:13
source share

I agree with most answers, except that in jupyter_notebook_config.py you need to put

 #c.NotebookApp.notebook_dir='c:\\test\\your_root' 

double \\ - key answer

+5
Jul 09 '17 at 13:25
source share

This question is quite old, and the problem seems to have been resolved, but if only to remind myself the next time that I ran into this problem, here is another solution (tested only on Windows 10).

A shortcut for a jupyter laptop (whether it is from the Start menu, a shortcut on the desktop or docked to the taskbar) causes a number of scripts (presumably to initialize a jupyter laptop, etc.) that are written in the "Target" text box from the Properties window shortcut Properties window . Adding

 --notebook-dir='C:/Your/Desired/Start/Directory/' 

should start the laptop in the specified directory (as @Victor O pointed out, it cannot be a disk, but it must be a folder).
If this does not do the trick, it also helps to add the same directory to the Start field.

Note. I used rewind in the target field and backslashes in the "Start" field. Feel free to change this if you are wondering which combinations work.

Also, it was not my idea, but I forgot where it came from (I checked the shortcut from my previous installation because I was sure that I did not try anything from this page, but the suggested path from the OP link is provided.). If someone wants to provide a link, do it.

Sorry if I cannot add fundamental research to this, but the solution worked for me on four separate systems and is quite simple to implement.

+4
Jan 01 '16 at 15:39
source share

A good tip is to simply navigate to the desired start folder in Windows Explorer:

  • click file
  • click Open command line
  • then just type "jupyter notebook" and press enter

The web browser should appear with the correct start folder soon.

+4
Apr 04 '17 at 17:15
source share

This method may not apply to your problem, but for me it is very useful.

Just type "cmd" in the address bar to open the command line and then "jupyter notebook".

Using this method, you can quickly open Anaconda jupyter from any path that you are currently on in Windows.

enter image description here enter image description here

+2
Jul 17 '18 at 12:21
source share

If your goal is to permanently change the launch location. You can do this by changing the laptop shortcut. Assuming you are on Windows 10

  1. Click "Start" and find "Jupiter's Notepad" in the "Anaconda" folder.
  2. Right click β†’ Advanced β†’ File Location
  3. Right-click on a short notebook Jupyter Notebook -> Properties
  4. Now in the goal: at the end you will see something similar to: "% USERPROFILE% /". Replace the contents of % USERPROFILE% / with the desired directory . e.g. "D: \ GoogleDrive"

Good luck

+2
Jul 21 '19 at 10:16
source share

I just installed Anaconda on Windows 10 and tried to configure Jupyter to open in my specified directory, including updating the Jupyter configuration file, as suggested above. This did not work. After looking at other threads, I came across the file "notebook.bat" in the .anaconda \ scripts \ folder. This launches Jupyter. I took a copy of the .bat file to the folder in which I want to work, launched it, and voila - Jupyter runs in this folder, and I no longer see each folder on my PC, only the one I want. One desktop shortcut later, and I'm happy as a non-tech. Hope this helps.

+1
Mar 22 '17 at 18:54
source share

You can make the bat file for Windows this way.

 D: (your dexired drive) cd \Your\Desired\Start\Derectory Jupyter notebook 

Save it as "JupyterNB.bat" (or whatever) and double-click it.

+1
May 21 '17 at 12:24 a.m.
source share

After many attempts, I did it. I mentioned the simplest steps below:

  • Right-click the jupyter launcher icon from the Start menu or Desktop or Navigator anaconda

  • Now you need to change 2 things on the screen: add your path to the goal and run in the properties window

    Cautions:

    but. Your path should be on the same drive as the drive where jupyter is installed. Since mine was on C drive, I used the following path: "C: / JupyterWorkLibrary"

    b. For the purpose, at the end of the existing path, i.e. After sript.py ", add this after the space. Some people mentioned removing% USERPROFILE% from the target. I did not come across this. Image for jupyter properties

    from. To get started, add the same path. I used the path without spaces to avoid problems. I would also suggest using the path in double quotes anyway d. I also used slashes in the path

  • Now just start the laptop. It must be open in the correct folder.

Hope this helps.

PS: I'm sure there are other ways, it worked for me. I am not even sure of the limitations mentioned. Just with these steps I could do my job.

+1
Nov 04 '17 at 10:47 on
source share
  • Try navigating to the folder from which you want to run jupyter notepad files.
  • Right-click in Explorer and click Open in Terminal enter image description here .
  • Then enter the jupyter notebook command to launch Notepad from the desired location. enter image description here enter image description here
+1
Jul 14 '18 at 18:57
source share

The following describes how to solve the same problem that I encountered. Most of the steps I took to solve the problems are already described in the solutions provided earlier by others.

There are two ways to run the Jupyter Notebook application.

  1. From Anaconda Navigator
  2. Use the shortcut (name: Jupyter Notebook) for the Jupyter Notebook application. On Windows, it is usually located in the folder: "C: \ Users \\ AppData \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs \ Anaconda3 (64-bit)"

There are various ways to configure the Jupyter Notebook application to save notebooks in a folder other than the default folder.

When using Anaconda Navigator to start a laptop

If you are using the Anaconda navigator to launch the Jupyter laptop application, the configuration method is to uncomment the c.NotebookApp.notebook_dir field in jupyter_notebook_config.py and add a path. After updating, the field looks like this: c.NotebookApp.notebook_dir = < Enter the absolute path here >

In the case of Windows, and when Anaconda is installed for a specific user, this file is located in C: \ Users \ < USERNAME > .jupyter.

If you did not find the ".jupyter" folder, follow these steps to create it.

  1. Run the anaconda command line
  2. At the command prompt, run "jupyter notebook --generate-config"

If you use a shortcut to launch the Jupyter Notebook application (name: Jupyter Notebook)

If you examine the command in the target field of this shortcut, you will notice that the Notebook application starts by executing the file "C: \ Users \ < USERNAME > \ Anaconda3 \ Scripts \ jupyter-notebook-script.py", which takes a path parameter.

The main approach to determining the location where the notebook files will be saved β†’ specify the path to the necessary folder when starting the Jupyter Notebook application. There are two ways to do this:

  1. Create an environment variable to point to the desired folder and use it as a parameter
  2. Define the absolute path in the shortcut itself

Follow these steps: (Note: replace the text in angle brackets with the actual text)

  1. Find the "Notepad Jupyter" label. When Anaconda was installed for a specific user (during the installation, the selected option was only for the user), the shortcut (Name: "Jupyter Notepad", Type: Shortcut) was located in "C: \ Users \ < USERNAME > \ AppData \ Roaming \". Microsoft \ Windows \ Start \ Menu \ Programs \ Anaconda3 (64-bit) "
  2. Right-click on the shortcut and select "Properties"
  3. In the "Target" field, find C: \ Users \ <USERNAME> \ Anaconda3 \ Scripts \ jupyter-notebook-script.py% USERPROFILE%
  4. Replace "% USERPROFILE%" with

    but. Or: an environment variable created to point to the folder in which you want to store notebook files. The command will look like this: C: \ Users \ <USERNAME> \ Anaconda3 \ Scripts \ jupyter-notebook-script.py% <ENVIRONMENTVARIABLE>%

    b. OR: the absolute path to the working folder which the laptop files to be saved in the command will look like this:. C: \ Users \ <USERNAME> \ Anaconda3 \ Scripts \ jupyter-notebook-script.py <F: // folder // subfolder >

  5. Replace the text (path) in the "Start with" field with the following text:

    but. Or: an environment variable created to point to the folder in which you want to store notebook files. The text in the "Start with" field will look like this:% < ENVIRONMENTVARIABLE >%

    b. OR: the absolute path to the working folder in which you want to store notebook files. The text in the "Start with" field will look like this: < F: // folder // subfolder >

Note 1: If there are spaces in the path, then the entire path must be enclosed in double quotes.

Note 2. The paths in this solution apply to situations where Anaconda 3 (and Jupyter 3) is installed on Windows for a specific user (not for all users).

I personally preferred to define an environment variable, rather than hard-writing the path in the shortcut.

0
Jul 08 '18 at 17:18
source share

You can use a program called FileMenuTools from Lopesoft for your command line and just type "jupyter notebook".

Alternatively, you can also use it to create a highlighted shortcut using the C: /windows/System32/cmd.exe program and the / k jupyter notebook arguments --notebook-dir = "% FOLDERPATH%", but this opens the notebook in the parent folder. therefore you must press down.

0
Nov 05 '18 at 15:23
source share

If you use WinPython and not anaconda, you need to go to the directory where you installed WinPython, for example, C:\WPy-3670\settings\.jupyter\jupyter_notebook_config.py

You need to edit this file and find the line #c.NotebookApp.notebook_dir = '' change it, for example, to c.NotebookApp.notebook_dir = 'D: /your_own_folder/containing/jupyter_notes'

You also need to change the backslash \ for the forward slash / . also be sure to uncomment the line by deleting #

0
Nov 09 '18 at 6:02
source share

This is what I do for Jupyter / Anaconda on Windows. This method also passes the jupyter Python configuration script. I use this to add the path to the parent folder of my project:

1 Create jnote.bat somewhere:

 @echo off call activate %1 call jupyter notebook "%CD%" %2 %3 pause 

In the same folder, create a Windows shortcut jupyter-notebook

  TARGET: D:\util\jnote.bat py3-jupyter --config=jupyter_notebook_config.py START IN: %CD% 

jupyter-notebook shortcut

Add the Jupyter badge to the shortcut.

2 In your jupyter project folders do the following:

Create jupyter_notebook_config.py , put what you like here:

 import os import sys import inspect # Add parent folder to sys path currentdir = os.path.dirname(os.path.abspath( inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) os.environ['PYTHONPATH'] = parentdir 

Then insert jupyter-notebook . Double-click the shortcut and your jupyter should light up and the packages in the parent folder will be available.

0
Jan 27 '19 at 9:20
source share



All Articles