Forums

How do I start a Jupyter Notebook?

In my Bash console, I typed jupyter notebook. It failed. A bunch of stuff scrolled off the top of the screen. It looked like a file telling me what to type. The last lines were:

[C 05:46:12.864 NotebookApp] Bad config encountered during initialization:
[C 05:46:12.864 NotebookApp] The 'kernel_spec_manager_class' trait of <notebook.notebookapp.NotebookApp object at 0x7fb862ebf390> instance must be a ty
pe, but 'environment_kernels.EnvironmentKernelSpecManager' could not be imported

You cannot run a jupyter notebook from a console. Click on the .ipynb file in the Files tab to open the notebook.

OK. There wasn't one. I created a new one through the interface on that screen.

Now it's giving me authentication errors when I try to launch it. I logged out and back in, but that didn't fix it.

Authentication error
There was an error authenticating you with the Notebook server. Please log out of PythonAnywhere and then log back in again.

What browser are you using? We've had some reports start coming in that seem to indicate that certain browsers are blocking the authentication in some way. Also, if you're using any browser extensions, try disabling them since some extensions may interfere with the notebook authentication.

The problem turned out to be Google Analytics, of all things.

I'm using Ungoogled Chromium. The only extensions I'm running are Privacy Badger and uBlock Origin. The only thing they were blocking was Google Analytics. When I turned those off, I still got the error. When I changed my cookie settings to accept all cookies, the notebook ran without problem.

I also tried in Safari. It has no extensions running. The error occurred there, too. I then went into the browser's settings and turned off "Prevent cross-site tracking". When I tried again, the notebook worked.

Why is Google Analytics required to run Jupyter Notebook?

It does not look like it was about Google Analytics cookies. You must have blocked our cookies related to authentication.