lspvic / jupyter_tensorboard

Start Tensorboard in Jupyter Notebook
MIT License
460 stars 81 forks source link

error #46

Open ghost opened 5 years ago

ghost commented 5 years ago

[I 19:53:08.853 NotebookApp] The port 8888 is already in use, trying another port. [I 19:53:08.854 NotebookApp] The port 8889 is already in use, trying another port. [I 19:53:08.855 NotebookApp] The port 8890 is already in use, trying another port. [I 19:53:08.855 NotebookApp] The port 8891 is already in use, trying another port. [W 19:53:08.868 NotebookApp] Error loading server extension jupyter_tensorboard Traceback (most recent call last): File "C:\Users\Farnaz Fallahi\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 1573, in init_server_extensions mod = importlib.import_module(modulename) File "C:\Users\Farnaz Fallahi\Anaconda3\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'jupyter_tensorboard' [I 19:53:08.902 NotebookApp] JupyterLab extension loaded from C:\Users\Farnaz Fallahi\Anaconda3\lib\site-packages\jupyterlab [I 19:53:08.902 NotebookApp] JupyterLab application directory is C:\Users\Farnaz Fallahi\Anaconda3\share\jupyter\lab [I 19:53:08.903 NotebookApp] Serving notebooks from local directory: C:\Users\Farnaz Fallahi [I 19:53:08.903 NotebookApp] The Jupyter Notebook is running at: [I 19:53:08.903 NotebookApp] http://localhost:8892/?token=f9c4f48fbad91e30f66623a8a1692021a9e117eb14b62c2f [I 19:53:08.903 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 19:53:08.909 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8892/?token=f9c4f48fbad91e30f66623a8a1692021a9e117eb14b62c2f [I 19:53:09.034 NotebookApp] Accepting one-time-token-authenticated connection from ::1 [W 19:53:10.144 NotebookApp] 404 GET /api/tensorboard?_=1552348389578 (::1) 12.96ms referer=http://localhost:8892/tree [W 19:53:12.479 NotebookApp] 404 POST /api/tensorboard (::1) 1.99ms referer=http://localhost:8892/tree

robertlugg commented 4 years ago

The first fix is to install jupyter_tensorboard:

pip install jupyter-tensorboard

Note the use of dash - versus underscore _ in the above command.

You likely have multiple servers already started based on "The port 8889", etc messages. In a linux shell, type:

ps -U username

, where username above should be yours. Look for and kill any running notebooks which likely are named jupyter using the command kill -9 pid, where pid is the number you see as a result of the ps command

hgxljy520 commented 2 years ago

I have another solution, you may have a file named "jupyter_notebook_config.json" in your ".jupyter" dictionary, edit it with this: { "NotebookApp": { "nbserver_extensions": { "jupyter_tensorboard": false } } } I have changed this sentence "jupyter_tensorboard": false , the previous was "jupyter_tensorboard": true, just change "true" to "false" and your jupyter notebook will not raise this problem again.