![]() Note that cmd will change to the location of the Command Prompt executable file (e.g. C:\Windows\System32\cmd.exe), and ‘/k’ keeps the Command Prompt window open to ensure Jypyter Notebook does not crash. Copy/paste or type the following into the prompt: In this case, we are wanting direct this shortcut to the Command Prompt and have it run the command to open Jupyter Notebook. In the Create Shortcut Windows prompt, type the location of the item you want the Shortcut Icon to direct to. Right-click, select ‘New’, then create a shortcut. Next, navigate to the folder we want to create your shortcut. ![]() To begin, we must have already installed Jupyter Notebook or Jupyter Lab. Just direct them to double-click on the icon and away they go! Creating Your Own Jupyter Notebook Shortcut Please feel free to let me know if you encounter any errors!Ī great application for this shortcut may be to include this shortcut in GitHub folders where you wish to direct someone to launch Jupyter Notebook with minimal confusion. This method allows you to drag-and-drop the icon you create into any folder and have it launch Jupyter Notebook from the new folder. While one trick you can use to open the Command Prompt in this folder is by typing ‘cmd’ in the navigation bar above (shown below) and pressing Enter/Return, I wanted to create a shortcut or icon I could double-click in any given folder and have it open Jupyter Notebook in that same working directory. Then, in file ipython_notebook_config.py (if it's default profile go into folder \profile_default), uncommnet and edit line:Ĭ.FileNotebookManager.notebook_dir = u'C:\\Users\\Lukasz\\Documents\\Github'Ĭhanging the my path to whatever path you like.Īfter above step Ipython should start with proper path.A petty annoyance I’ve encountered when wanting to open Jupyter Notebook ( overview) is that I couldn’t find a way to instantly open it in my current Windows Explorer window. Firstly, locate the ipython profile, in the cmdline, type:ĭefault profile location (using Anaconda) is: %USERNAME%\.ipython It can be done permanently in ipython notebook config files. You can change the default directory for notebooks. Then modify content of the script with this: import sys Get the python script that launches Jupyther Network app called jupyter-notebook-script.py (it is usually located in C:\Anaconda3\Scripts\). Here is what it looks like in a Windows command file: jupyter notebook -notebook-dir="?%" The command launches IPython with current directory as notebook directory. jupyter notebook -notebook-dir="D:\Sandbox"įor frequently used directories, I create a command file in the directory itself. I start IPython notebook from the command line, specifying the notebook directory. This makes changing the default directory impractical. ![]() In my everyday work I use Anaconda and IPython notebooks from different locations, including USB sticks. You can specify notebook directory per kernel session. For example, you can make D:\Sandbox to be your notebook directory: c.NotebookApp.notebook_dir = 'D://Sandbox' Next time you launch IPython, it will open with the notebook directory you specified. Find, un-comment and modify the following line in your jupyter_notebook_config.py to point to the desired directory: # c.NotebookApp.notebook_dir = '' jupiter/jupyter_notebook_config.py file under your home directory.ġ.2. Open a command window and execute: jupyter notebook -generate-config To change the default notebook directory for all IPython kernel sessions:ġ.1. There are different situations where the IPython notebook directory change is necessary. Solution 3īy default the directory where Jupyter was started is uses as a notebook directory. To change the default directory on startup, locate the line: c.NotebookApp.notebook_dir = u''Īnd put your preferred directory in the quotes. Which will create a file named jupyter_notebook_config.py in your jupyter directory (In Windows Users/USERNAME/.jupyter). In the command line type: jupyter notebook -generate-config Not sure if this is helpful, but as of 11/2/15, Anaconda 2.4.0 moved to Jupyter, which has a different method for changing the default directory I think in principle you could edit some file somewhere to change what directory it uses. It's not as easy to change the directory used by the Launcher. You can right click the Start menu shortcut and change the starting directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |