Newbee here: struggling with network connection and opening a new python file

There are a lot of ways to run JupyterLab so you’d have to really describe better how you are running it for use to provide much help.


Since you are new, one option to help you understand things is to compare what you are experiencing to JupyterLab running from a remote, virtual machine without installing anything on your own machine or signing up for an account. You can get a temporary session by going here and clicking on the ‘launch binder’ badge. After the session starts up, you should be able to open a new Jupyter Notebook, or even a Python file, by hitting the gray ‘+’ button to start the launcher with many choices. (The Python script choice will be down on the bottom row.) Then from in your notebook you can run that Python file by putting %run my_script.py in a cell and executing it. Save anything useful you make to your local computer by downloading it because it will be easier to pick back up later with a session. (Although the cloud icons and the download buttons along the top of the notebook are supposed to help you even if you get disconnected, but it is best to try it before you need this safety net, see here for more about it.)

Because that MyBinder launched session is temporary it will disconnect after a little time of no activity or a few hours even if you are active. So if you need something that won’t disconnect, you can try JupyterLite by going to here and clicking on the top left tile that says ‘JupyterLab’. After hitting the ‘+’ button to get the Launch again, you can make a new Python script in there, too. You can even play it the same way; however, if you note the kernel is not quite typical ipykernel. Be advised though the JupyterLite pyodie kernel has some experimental features that may not make it best for your learning because it won’t do everything exactly like some sites for novices may mention. Although it has been getting more and more like the typical ipykernel, see here where it mentions input() now works in JupyterLite, for example.


As for using JupyterLab locally, you may with to look in to JupyterLab Desktop. The blog describes how you are expected to use it for projects and things.

Installing the Anaconda Distribution or using the Anaconda Cloud are other options that include JupyterLab that usually comes in working order to make Python scripts; however, using either to the fullest extent has a pretty steep curve for someone getting started.