Jupyter -- opening notebooks on mac - python

This is a bit hard to explain so bear with me! Suppose I have a Jupyter notebook in some directory. The only way I know to open it is to click repeatedly through the web based directory structure. Is there a nice way to do this using the mac finder. In other words I would like a simple dialogue box to open from Jupyter to navigate to my notebook.
edit: thanks, I realized that I can start in certain directories, but what if I'm opening a bunch of different notebooks from different directories. It sure would be nice to be able to jump to my favorites easily.

As #GiantsLoveDeathMetal mentions... if you navigate to a specific directory in your terminal and then type jupyter notebook the notebook will open and display in your browser, just the content of that folder.
For example:
$ cd /path/to/the/folder/with/your/notebook.ipynb
$ jupyter notebook

Related

View Jupyter notebooks hosted on Sharepoint

In our institute, we use OneDrive / Sharepoint from Microsoft to share files with each other. I am also sharing my Jupyter notebooks - with extension *.ipynb - there. Unfortunately, when one clicks on such a file the message "Hmm... looks like this file doesn't have a preview we can show you" appears. In my case I developed my notebooks with python. It's not necessary that my colleagues can run the notebook, but it would indeed be much easier to be able to install a kind of plugin for previewing on the Sharepoint server. Is there any product that can work like this? Otherwise I'll have to always export the file to HTML or so :-(
Unfortunately, there isn't any good news so far. Such a plugin seems to be unavailable as yet. For the meantime, I have automated the exporting of the notebooks to HTML on my Windows 10 machine as follows:
For /R .\ %G IN (*.ipynb) do jupyter nbconvert --to html "%G"
For use in a *.bat file, you'll have to double the %-signs.

How to directly open Jupyter from cmd instead of copying link

I often use jupyter for classes, and use the commmand python -m notebook to open the notebook. The tab that opens up shows an error, and then I have to copy one of the links in the terminal window instead. Is there a way or a command that I can use so that one of those links automatically opens up?
NOTE: It opens the file location (first address in the picture) and fails, and I use the links below to open jupyter. I want the terminal to open the links directly if possible to save time.
This is the error that I get.
jupyter notebook notebook.ipynb
Taken from this documentation.
It shouldn't matter whether you install it using conda or pip.
Or you can just type jupyter notebook which should open up a your file directory in the browser and let you navigate to the notebook file you want to open.
Edit: For this error, it really is hard without knowing the full context of the commands you are running, the directory you are calling from, and where this file you want to open is located. Make sure you are in the folder that contains your notebook file. If not, you should specify the entire path to the notebook file. Finally, does the command jupyter notebook by itself work?

"The system cannot find the path specified."/ "The notebook list is empty"

Please I need help with an issue.
I can't access the folders in my Documents folder on Command Prompt. I also noticed this problem with my Jupyter Notebook. The system does not detect the folders in my Documents folder. It returns an error message on Command Prompt which says, "The system cannot find the path specified.". On Jupyter Notebook, it's still the same issue; it says, "The notebook list is empty." But my Documents folder is not empty.
Please, what is causing this issue?
I use a Windows 10 HP computer.
I had the same issue and I realized OneDrive creates a backup from folders such as Documents, Desktop, Pictures,...
You can open the OneDrive folder on your computer or in Jupyter notebook and see all files are there.
In order to access them via Jupyter notebook directly, you can type cd OneDrive in Command Prompt then start Jupyter Notebook there. Then all the files will be shown.
For example in Windows 10, I use these lines in Command Prompt:
cd OneDrive
python -m notebook
Check the permissions of the particular folder. On the respective folder, right-click --> give access to-->. In the appearing list, make sure that "view and edit" access is granted to all users if you have more than 1.
(To do this you will require admin privileges. So make sure in your windows PC you have logged on as an admin.)

Error While Launching jupyter Notebook

I am using Python 3.4 version and when I am trying to open the jupyter Notebook the explorer does open but it displays a link in the explorer like this and after that nothing happens.I am not able to view anything in the explorer
http://localhost:8823/tree?token=27c7f7543497392b736e1f2b74f1d6af93c2065dcbe67c61
What should I do to see the proper jupyter notebook? thanks in advance
You can just retype the url to
http://localhost:8823
If it still show nothing, try to run it on another non empty directory
jupyter notebook --notebook-dir="C:\another directory"
I typed jupyter notebook list on the annaconda prompt , it then gave me a list of all the currently running servers.
i copied one of the servers in the chrome window and it worked

Open a Jupyter notebook within running server from command line

My Jupyter/IPython notebooks reside in various directories all over my file system. I don't enjoy navigating hierarchies of directories in the Jupyter notebook browser every time I have to open a notebook. In absence of the (still) missing feature allowing to bookmark directories within Jupyter, I want to explore if I can open a notebook from the command line such that it is opened by the Jupyter instance that is already running. I don't know how to do this....
Option 1: Run multiple jupyter notebook servers from your project directory root(s). This avoids navigating deeply nested structures using the browser ui. I often run many notebook servers simultaneously without issue.
$ cd path/to/project/; jupyter notebook;
Option 2: If you know the path you could use webbrowser module
$ python -m webbrowser http://localhost:port/path/to/notebook/notebook-name.ipynb
Of course you could alias frequently accessed notebooks to something nice as well.

Categories

Resources