In the new cell enter the following Python code:.In the header click Untitled and rename the notebook to Hello.On the right side of the browser view, click the New dropdown.You should now be looking at the tree (folder) view. * Run this in a terminal window ( adjust for your hostname): ssh -N -f -L localhost:8888:localhost:8888 Open up a browser (I'm using Chrome) On your Pi, do the following: jupyter notebook -no-browser If you lose your connection, close the terminal window and try another one. To secure Jupyter, setup a password: jupyter notebook password Jupyter nbextension enable -py widgetsnbextension Sudo apt-get install python-picamera python3-picamera Sudo apt-get install python-rpi.gpio python3-rpi.gpio To install the python libraries needed to run Jupyter, run the following commands: sudo apt install python3-pip python3-pil Note that it is now connecting to the mirror: Get:1 buster InRelease Insert this line at the top (sub with a reliable mirror near you):.You can try the same or just skip to the next step and see if it works (if not, come back to this step). In my case I needed to switch my system to another mirror of the resources. Switch mirrors (optional)įor the steps that follow I had trouble finding packages when I ran apt-get. Under Interfacing options enable the following:.For example (substitute mypi with your Pi's hostname):.Perform an ssh login to access your Raspberry Pi.Open up a terminal / command line window on your computer.The image I've setup has ssh enabled so I can remotely log into it. If you'd like to know how I setup the headless image before I added Jupyter, I've provided some links at the end of this article. This is sometimes referred to as physical computing. It also provides examples of how to use the GPIO to read a button and control an LED from within a Jupyter Notebook. This article covers setting up a headless Raspberry Pi as a Jupyter Notebook server.
0 Comments
Leave a Reply. |