ioos / notebooks_demos

Notebook demonstrations and examples
https://ioos.github.io/notebooks_demos/
MIT License
19 stars 19 forks source link

Jupyter notebook problem with clean install of ioos python and r env #401

Closed MathewBiddle closed 3 years ago

MathewBiddle commented 3 years ago

I'm on a loaner machine so I had to go through, install conda, and recreate the IOOS python and r env. Everything seems to install correctly, but when I go to fire up the Jupyter Notebook, the browser sits on this screen and the wheel spins (I've clicked the link and tried different browsers, cleared cache, etc. nothing helps): image

Here's the terminal when I fire up the notebook server:

(IOOS) C:\Users\Mathew.Biddle\PycharmProjects\notebooks_demos>jupyter notebook
[I 10:43:20.353 NotebookApp] The port 8888 is already in use, trying another port.
[I 10:43:20.355 NotebookApp] The port 8889 is already in use, trying another port.
[I 10:43:20.356 NotebookApp] The port 8890 is already in use, trying another port.
[I 10:43:20.357 NotebookApp] The port 8891 is already in use, trying another port.
[I 10:43:20.435 NotebookApp] Loading IPython parallel extension
[I 10:43:20.543 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.1
[I 10:43:24.273 NotebookApp] Serving notebooks from local directory: C:\Users\Mathew.Biddle\PycharmProjects\notebooks_demos
[I 10:43:24.273 NotebookApp] Jupyter Notebook 6.3.0 is running at:
[I 10:43:24.274 NotebookApp] http://localhost:8892/?token=10fb2fd74a3d8310d3b1f648494a80a474166dc4a6929766
[I 10:43:24.274 NotebookApp]  or http://127.0.0.1:8892/?token=10fb2fd74a3d8310d3b1f648494a80a474166dc4a6929766
[I 10:43:24.274 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 10:43:24.350 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/Mathew.Biddle/AppData/Roaming/jupyter/runtime/nbserver-8672-open.html
    Or copy and paste one of these URLs:
        http://localhost:8892/?token=10fb2fd74a3d8310d3b1f648494a80a474166dc4a6929766
     or http://127.0.0.1:8892/?token=10fb2fd74a3d8310d3b1f648494a80a474166dc4a6929766

I've been able to get Jupyter up and running in another env, just not the IOOS one...

I wonder if this has anything to do with this merged PR: https://github.com/ioos/notebooks_demos/pull/397. I noticed the addition of jupyter_contrib_nbextensions and jupyter_nbextensions_configurator.

ocefpaf commented 3 years ago

It should not. It looks like it is trying to open an HTML. Did you try to copy-n-paste the URL?

See this part of the error:

To access the notebook, open this file in a browser:
    file:///C:/Users/Mathew.Biddle/AppData/Roaming/jupyter/runtime/nbserver-8672-open.html
Or copy and paste one of these URLs:
    http://localhost:8892/?token=10fb2fd74a3d8310d3b1f648494a80a474166dc4a6929766
 or http://127.0.0.1:8892/?token=10fb2fd74a3d8310d3b1f648494a80a474166dc4a6929766

http://localhost:8892/?token=... should be it, not the nbserver-8672-open.html.

MathewBiddle commented 3 years ago

Yeah, I've tried a copy paste with both of those URLs. Also in different browsers...

FWIW, I just tested a new environment build with the spec below and kicked off Jupyter without issues:

name: pythonProject
channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.8
  - cfunits==3.2.9
  - folium
  - jupyter
  - matplotlib
  - xarray
  - cartopy
  - netcdf4

I'll keep tinkering and see if it fixes itself.

ocefpaf commented 3 years ago

That is quite odd. I'll try to get a windows computer to test it later today. I cannot reproduce it on Linux.

MathewBiddle commented 3 years ago

I'm on a new machine and this all seems to be working again. Not sure what happened with that loaner. I tried multiple remove and install's and none of them worked w/ the IOOS env. All is good now.

ocefpaf commented 3 years ago

That is odd but maybe you had a different version of conda or something... Conda-forge requires conda >=4.9 b/c of a recent virtual package bug.