R Kernel is not working with Jupyter notebook - r
I am trying to solve the problem of my Jupyter notebook not being able to run r code in its r kernel because of a disconnection issue. I am running Jupyter on a Mac with BigSur 11.6 and the notebook opens right until I try to run a cell when the kernel lose the connection and becomes connecting to kernel showing the information below, but it never reconnects:
Last login: Wed Oct 6 12:40:11 on ttys001
/opt/anaconda3/envs/entornor/bin/jupyter_mac.command ; exit;
(base) fersaol#MacBook-Air-de-fersaol ~ % /opt/anaconda3/envs/entornor/bin/jupyter_mac.command ; exit;
[I 13:33:25.566 NotebookApp] The port 8888 is already in use, trying another port.
[I 13:33:25.567 NotebookApp] Serving notebooks from local directory: /Users/fersaol
[I 13:33:25.567 NotebookApp] Jupyter Notebook 6.4.3 is running at:
[I 13:33:25.567 NotebookApp] http://localhost:8889/?token=9a9e27f00fcdc90028309fc5676e2548f6cbd2e6acb79550
[I 13:33:25.567 NotebookApp] or http://127.0.0.1:8889/?token=9a9e27f00fcdc90028309fc5676e2548f6cbd2e6acb79550
[I 13:33:25.567 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 13:33:25.570 NotebookApp]
To access the notebook, open this file in a browser:
file:///Users/fersaol/Library/Jupyter/runtime/nbserver-9257-open.html
Or copy and paste one of these URLs:
http://localhost:8889/?token=9a9e27f00fcdc90028309fc5676e2548f6cbd2e6acb79550
or http://127.0.0.1:8889/?token=9a9e27f00fcdc90028309fc5676e2548f6cbd2e6acb79550
/opt/anaconda3/envs/entornor/lib/python3.8/json/encoder.py:257: UserWarning: date_default is deprecated since jupyter_client 7.0.0. Use jupyter_client.jsonutil.json_default.
return _iterencode(o, 0)
[W 13:33:32.946 NotebookApp] Notebook INSPYR/Curso Data Analytics 2021_2022/R/kernel_R_blank.ipynb is not trusted
ERROR:asyncio:Exception in callback <TaskWakeupMethWrapper object at 0x7fc5f002d5b0>(<Future finis...late\r\n\r\n'>)
handle: <Handle <TaskWakeupMethWrapper object at 0x7fc5f002d5b0>(<Future finis...late\r\n\r\n'>)>
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-4' coro=<HTTP1ServerConnection._server_request_loop() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/http1connection.py:823> wait_for=<Future finished result=b'GET /kernel...flate\r\n\r\n'> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> while another task <Task pending name='Task-1' coro=<MultiKernelManager._async_start_kernel() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/jupyter_client/multikernelmanager.py:186>> is being executed.
ERROR:asyncio:Exception in callback <TaskWakeupMethWrapper object at 0x7fc611af0fd0>(<Future finis...uest\r\n\r\n'>)
handle: <Handle <TaskWakeupMethWrapper object at 0x7fc611af0fd0>(<Future finis...uest\r\n\r\n'>)>
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-5' coro=<HTTP1ServerConnection._server_request_loop() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/http1connection.py:823> wait_for=<Future finished result=b'GET /api/co...quest\r\n\r\n'> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> while another task <Task pending name='Task-2' coro=<KernelManager._async_start_kernel() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/jupyter_client/manager.py:331>> is being executed.
ERROR:asyncio:Exception in callback <TaskWakeupMethWrapper object at 0x7fc5f002da60>(<Future finis...late\r\n\r\n'>)
handle: <Handle <TaskWakeupMethWrapper object at 0x7fc5f002da60>(<Future finis...late\r\n\r\n'>)>
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-12' coro=<HTTP1ServerConnection._server_request_loop() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/http1connection.py:823> wait_for=<Future finished result=b'GET /custom...flate\r\n\r\n'> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> while another task <Task pending name='Task-36' coro=<MappingKernelManager.start_kernel() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/notebook/services/kernels/kernelmanager.py:176> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> is being executed.
ERROR:asyncio:Exception in callback <TaskWakeupMethWrapper object at 0x7fc5f002d790>(<Future finis...late\r\n\r\n'>)
handle: <Handle <TaskWakeupMethWrapper object at 0x7fc5f002d790>(<Future finis...late\r\n\r\n'>)>
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-13' coro=<HTTP1ServerConnection._server_request_loop() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/http1connection.py:823> wait_for=<Future finished result=b'GET /static...flate\r\n\r\n'> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> while another task <Task pending name='Task-36' coro=<MappingKernelManager.start_kernel() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/notebook/services/kernels/kernelmanager.py:176> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> is being executed.
[I 13:33:33.022 NotebookApp] Kernel started: 4c13344d-0183-4a69-ae2f-b096e0381969, name: ir
[W 13:33:33.029 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20211006133325 (::1) 8.840000ms referer=http://localhost:8889/notebooks/INSPYR/Curso%20Data%20Analytics%202021_2022/R/kernel_R_blank.ipynb
dyld: Library not loaded: #rpath/libreadline.6.2.dylib
Referenced from: /opt/anaconda3/lib/R/lib/libR.dylib
Reason: image not found
[I 13:33:36.025 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
dyld: Library not loaded: #rpath/libreadline.6.2.dylib
Referenced from: /opt/anaconda3/lib/R/lib/libR.dylib
Reason: image not found
[W 13:34:33.048 NotebookApp] Timeout waiting for kernel_info reply from 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:37.607 NotebookApp] Nudge: attempt 10 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:42.648 NotebookApp] Nudge: attempt 20 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:47.703 NotebookApp] Nudge: attempt 30 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:52.761 NotebookApp] Nudge: attempt 40 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:57.822 NotebookApp] Nudge: attempt 50 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:02.875 NotebookApp] Nudge: attempt 60 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:07.927 NotebookApp] Nudge: attempt 70 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:12.986 NotebookApp] Nudge: attempt 80 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:18.039 NotebookApp] Nudge: attempt 90 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:23.096 NotebookApp] Nudge: attempt 100 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:28.146 NotebookApp] Nudge: attempt 110 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
/opt/anaconda3/envs/entornor/lib/python3.8/json/encoder.py:257: UserWarning: date_default is deprecated since jupyter_client 7.0.0. Use jupyter_client.jsonutil.json_default.
return _iterencode(o, 0)
[I 13:35:33.001 NotebookApp] Saving file at /INSPYR/Curso Data Analytics 2021_2022/R/kernel_R_blank.ipynb
[E 13:35:33.058 NotebookApp] Uncaught exception GET /api/kernels/4c13344d-0183-4a69-ae2f-b096e0381969/channels?session_id=a668eb1aa6fd463ea8422ed32d825314 (::1)
HTTPServerRequest(protocol='http', host='localhost:8889', method='GET', uri='/api/kernels/4c13344d-0183-4a69-ae2f-b096e0381969/channels?session_id=a668eb1aa6fd463ea8422ed32d825314', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/websocket.py", line 956, in _accept_connection
await open_result
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/tasks.py", line 349, in __wakeup
future.result()
tornado.util.TimeoutError: Timeout
[W 13:35:34.076 NotebookApp] Replacing stale connection: 4c13344d-0183-4a69-ae2f-b096e0381969:a668eb1aa6fd463ea8422ed32d825314
You can use Visual Studio Code instead which spins up Jupyter notebook as well
You can put Jupyter and R into a docker container to isolate it from your system to minimize errors
You can try a fresh python env (Seems that the package asyncio is broken)
Related
Jupyter notebook show error: Exception while loading config file
I open Anaconda and then open Jupyter notebook (6.1.4). http://localhost:8903/tree is opened However, when I click New Python3 a blank page with below address opened. It keep spinning, look like trying to open the python3 http://localhost:8959/notebooks/Untitled21.ipynb?kernel_name=python3 Also a notice box "Application Launch error" appear with following text Can anyone help, please? Thanks HHC [E 10:40:06.955 NotebookApp] Exception while loading config file C:\Users\HPNEW\.jupyter\jupyter_notebook_config.py Traceback (most recent call last): File "C:\Users\HPNEW\anaconda3\lib\site-packages\traitlets\config\application.py", line 737, in _load_config_files config = loader.load_config() File "C:\Users\HPNEW\anaconda3\lib\site-packages\traitlets\config\loader.py", line 616, in load_config self._read_file_as_dict() File "C:\Users\HPNEW\anaconda3\lib\site-packages\traitlets\config\loader.py", line 648, in _read_file_as_dict exec(compile(f.read(), conf_filename, 'exec'), namespace, namespace) File "C:\Users\HPNEW\.jupyter\jupyter_notebook_config.py", line 149 c.NotebookApp.browser = u'C:/Program Files/Mozilla Firefox/firefox.exe %s' ^ IndentationError: unexpected indent [I 10:40:07.629 NotebookApp] The port 8888 is already in use, trying another port. [I 10:40:07.630 NotebookApp] The port 8889 is already in use, trying another port. [I 10:40:07.630 NotebookApp] The port 8890 is already in use, trying another port. [I 10:40:07.631 NotebookApp] The port 8891 is already in use, trying another port. [I 10:40:07.631 NotebookApp] The port 8892 is already in use, trying another port. [I 10:40:07.890 NotebookApp] JupyterLab extension loaded from C:\Users\HPNEW\anaconda3\lib\site-packages\jupyterlab [I 10:40:07.891 NotebookApp] JupyterLab application directory is C:\Users\HPNEW\anaconda3\share\jupyter\lab [I 10:40:07.898 NotebookApp] Serving notebooks from local directory: C:\Users\HPNEW [I 10:40:07.898 NotebookApp] Jupyter Notebook 6.1.4 is running at: [I 10:40:07.898 NotebookApp] http://localhost:8959/?token=042d81d0eafc2db7d720a15adc7a5815bec1dedf42d6b248 [I 10:40:07.899 NotebookApp] or http://127.0.0.1:8959/?token=042d81d0eafc2db7d720a15adc7a5815bec1dedf42d6b248 [I 10:40:07.899 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 10:40:07.969 NotebookApp] To access the notebook, open this file in a browser: file:///C:/Users/HPNEW/AppData/Roaming/jupyter/runtime/nbserver-13804-open.html Or copy and paste one of these URLs: http://localhost:8959/?token=042d81d0eafc2db7d720a15adc7a5815bec1dedf42d6b248 or http://127.0.0.1:8959/?token=042d81d0eafc2db7d720a15adc7a5815bec1dedf42d6b248
Jupyter Notebook Not Showing Output
I have using jupyter notebook for past few months. I am facing this type of problem for the first time. Exact Problem : When I run a cell on jupyter notebook it is running for long time, but not showing any output. Solution that I have already tried based on some google searches: 1. Uninstalled anaconda and reinstalled it. 2. Updated conda 3. Updated ipykernel 4. Download and installed microsoft visual c++ 2015 redistribute update 3 5. Restarted kernel and tried again 6. Shutdown files in running tab 7. And so on. Properties: 1. Windows 10 Pro 2. Python : Python 3.6.7 3. Jupyter :- jupyter core : 4.6.3 jupyter-notebook : 6.1.1 qtconsole : 4.7.5 ipython : 7.16.1 ipykernel : 5.3.4 jupyter client : 6.1.6 jupyter lab : not installed nbconvert : 5.6.1 ipywidgets : 7.5.1 nbformat : 5.0.7 traitlets : 4.3.3 4. Anaconda 3 - 64 bit Error showing in jupyter notebook prompt: [I 21:24:04.349 NotebookApp] JupyterLab extension loaded from C:\Users\Mathesh\Anaconda3\lib\site-packages\jupyterlab [I 21:24:04.349 NotebookApp] JupyterLab application directory is C:\Users\Mathesh\Anaconda3\share\jupyter\lab [I 21:24:04.411 NotebookApp] Serving notebooks from local directory: C:\Users\Mathesh [I 21:24:04.411 NotebookApp] The Jupyter Notebook is running at: [I 21:24:04.418 NotebookApp] http://localhost:8888/?token=8e7be14b316ad1fd7bfb00fe144e3a98ea7655979b6d18dd [I 21:24:04.418 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 21:24:04.555 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=8e7be14b316ad1fd7bfb00fe144e3a98ea7655979b6d18dd [I 21:24:15.956 NotebookApp] Accepting one-time-token-authenticated connection from ::1 [I 21:24:47.204 NotebookApp] Kernel started: f321d571-c5dc-41c0-867e-6e69da753793 [I 21:25:07.344 NotebookApp] Starting buffering for f321d571-c5dc-41c0-867e-6e69da753793:2828c21d9fb2439fb9aa4251d66f845a [I 21:25:08.333 NotebookApp] Restoring connection for f321d571-c5dc-41c0-867e-6e69da753793:2828c21d9fb2439fb9aa4251d66f845a [W 21:26:38.362 NotebookApp] WebSocket ping timeout after 90013 ms. [I 21:26:43.385 NotebookApp] Starting buffering for f321d571-c5dc-41c0-867e-6e69da753793:2828c21d9fb2439fb9aa4251d66f845a [I 21:26:44.458 NotebookApp] Restoring connection for f321d571-c5dc-41c0-867e-6e69da753793:2828c21d9fb2439fb9aa4251d66f845a [I 21:26:45.506 NotebookApp] Saving file at /Desktop/Testing_Sample.ipynb [I 21:27:35.723 NotebookApp] Kernel restarted: f321d571-c5dc-41c0-867e-6e69da753793 [I 21:27:45.719 NotebookApp] Starting buffering for f321d571-c5dc-41c0-867e-6e69da753793:2828c21d9fb2439fb9aa4251d66f845a [I 21:27:45.860 NotebookApp] Saving file at /Desktop/Testing_Sample.ipynb [I 21:27:53.886 NotebookApp] Kernel shutdown: f321d571-c5dc-41c0-867e-6e69da753793 [W 21:27:53.891 NotebookApp] 404 POST /api/kernels/f321d571-c5dc-41c0-867e-6e69da753793/restart (::1): Kernel does not exist: f321d571-c5dc-41c0-867e-6e69da753793 [W 21:27:53.892 NotebookApp] Kernel does not exist: f321d571-c5dc-41c0-867e-6e69da753793 [W 21:27:53.892 NotebookApp] 404 POST /api/kernels/f321d571-c5dc-41c0-867e-6e69da753793/restart (::1) 19414.84ms referer=http://localhost:8888/notebooks/Desktop/Testing_Sample.ipynb Sample image for Reference: https://drive.google.com/file/d/1aITxCLfK1NViosRCdE6iORTHtO9sDgYX/view?usp=sharing Since I am new user I am unable to post an image. So I have attached the drive link of that image. Advance thanks for sparing time on my question.
Event loop is running error on starting jupyter notebook
For some odd reason, after last night my jupyter kernel wouldn't start so I went ahead and removed it and pip3 installed it and now everytime I run jupyter notebook Im getting the following long stack trace in the termninal [I 14:59:43.566 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret [I 14:59:43.885 NotebookApp] Serving notebooks from local directory: /home/dmitri/machine_learning/airbusShipDetection [I 14:59:43.885 NotebookApp] The Jupyter Notebook is running at: [I 14:59:43.885 NotebookApp] http://localhost:8888/?token=b98d3bd1ec284b81559e0a865c14d6a0932e0725a99d811d [I 14:59:43.885 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 14:59:43.885 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=b98d3bd1ec284b81559e0a865c14d6a0932e0725a99d811d [I 14:59:44.624 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1 [I 14:59:48.412 NotebookApp] Kernel started: 15342e49-8fc3-402c-9964-eb8f4e2324c5 Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel_launcher.py", line 16, in <module> app.launch_new_instance() File "/home/dmitri/.local/lib/python3.5/site-packages/traitlets/config/application.py", line 658, in launch_instance app.start() File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 477, in start ioloop.IOLoop.instance().start() File "/usr/local/lib/python3.5/dist-packages/tornado/platform/asyncio.py", line 132, in start self.asyncio_loop.run_forever() File "/usr/lib/python3.5/asyncio/base_events.py", line 340, in run_forever raise RuntimeError('Event loop is running.') RuntimeError: Event loop is running. ERROR:tornado.general:Uncaught exception in ZMQStream callback Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/zmqstream.py", line 432, in _run_callback callback(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/tornado/stack_context.py", line 300, in null_wrapper return fn(*args, **kwargs) File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher return self.dispatch_shell(stream, msg) File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell self.pre_handler_hook() File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 248, in pre_handler_hook self.saved_sigint_handler = signal(SIGINT, default_int_handler) File "/usr/lib/python3.5/signal.py", line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) ValueError: signal only works in main thread ERROR:tornado.general:Uncaught exception in zmqstream callback Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/zmqstream.py", line 450, in _handle_events self._handle_recv() File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/zmqstream.py", line 480, in _handle_recv self._run_callback(callback, msg) File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/zmqstream.py", line 432, in _run_callback callback(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/tornado/stack_context.py", line 300, in null_wrapper return fn(*args, **kwargs) File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher return self.dispatch_shell(stream, msg) File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell self.pre_handler_hook() File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 248, in pre_handler_hook self.saved_sigint_handler = signal(SIGINT, default_int_handler) File "/usr/lib/python3.5/signal.py", line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) ValueError: signal only works in main thread [W 15:00:48.619 NotebookApp] Timeout waiting for kernel_info reply from 15342e49-8fc3-402c-9964-eb8f4e2324c5 [I 15:01:49.148 NotebookApp] Saving file at /u-net-model-with-submission.ipynb ^C[I 15:02:46.820 NotebookApp] interrupted Serving notebooks from local directory: /home/dmitri/machine_learning/airbusShipDetection 1 active kernel The Jupyter Notebook is running at: The notebook itself says the kernel is loading, but it never finishes loading.
I had the same problem after upgrading notebook. Upgrading tornado and ipykernel fixed it for me.
If you use the following commands in your terminal, it should work: pip install tornado==5.1.1 and pip install -U ipykernel After rolling back "tornado" and updating "ipykernel" everything worked.
Issue modifying Jupyter Home Directory
At one point I set my Jupyter home directory to ~/Dropbox Unfortunately, because of the way Dropbox changed their folder name that location is now a symbolic link on my machine that points to a hidden directory. This causes the following error in Jupyter Refusing to serve hidden directory '/Users/alex/Dropbox', via 404 Error That's fine ... I'd like to now change my Jupyter home directory, but the issue I'm having is that I can't figure out where it's currently set. I've checked my ~/.jupyter/jupyter_notebook_config.py but that seems to be unmodified from the default. The output of $jupyter --paths is : config: /Users/alex/.jupyter /usr/local/Cellar/python#2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/etc/jupyter /usr/local/etc/jupyter /etc/jupyter data: /Users/alex/Library/Jupyter /usr/local/Cellar/python#2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/share/jupyter /usr/local/share/jupyter /usr/share/jupyter runtime: /Users/alex/Library/Jupyter/runtime Interestingly, the following directories don't exist. /usr/local/Cellar/python#2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/etc/jupyter /usr/local/etc/jupyter /etc/jupyter Setting c.NotebookApp.notebook_dir = '/Users/alex/' in /Users/alex/.jupyter/jupyter_notebook_config.py seems to have no effect. $jupyter notebook [I 18:26:34.756 NotebookApp] [nb_conda_kernels] enabled, 4 kernels found [I 18:26:35.257 NotebookApp] The port 8888 is already in use, trying another port. [I 18:26:35.258 NotebookApp] The port 8889 is already in use, trying another port. [I 18:26:35.259 NotebookApp] The port 8890 is already in use, trying another port. [I 18:26:35.260 NotebookApp] The port 8891 is already in use, trying another port. [I 18:26:36.299 NotebookApp] [nb_anacondacloud] enabled [I 18:26:36.304 NotebookApp] [nb_conda] enabled [I 18:26:36.382 NotebookApp] ✓ nbpresent HTML export ENABLED [W 18:26:36.382 NotebookApp] ✗ nbpresent PDF export DISABLED: No module named 'nbbrowserpdf' [I 18:26:36.388 NotebookApp] Serving notebooks from local directory: /Users/alex [I 18:26:36.388 NotebookApp] 0 active kernels [I 18:26:36.388 NotebookApp] The Jupyter Notebook is running at: [I 18:26:36.388 NotebookApp] http://localhost:8892/?token=289948463daed06187325be63202f620b812dddc14f2918a [I 18:26:36.388 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 18:26:36.389 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8892/?token=289948463daed06187325be63202f620b812dddc14f2918a [I 18:26:36.717 NotebookApp] Accepting one-time-token-authenticated connection from ::1 [I 18:26:37.252 NotebookApp] Refusing to serve hidden directory '/Users/alex/Dropbox', via 404 Error [W 18:26:37.252 NotebookApp] 404 GET /api/contents?type=directory&_=1526088397023 (::1): directory does not exist: 'Dropbox' [W 18:26:37.252 NotebookApp] directory does not exist: 'Dropbox' [W 18:26:37.253 NotebookApp] 404 GET /api/contents?type=directory&_=1526088397023 (::1) 15.70ms referer=http://localhost:8892/tree Where could the Jupyter home directory be set from?
It is the intended behavior of jupyter notebook to throw a 404 when starting it from a hidden folder. Generally, jupyter notebook will start in the folder where you invoke the jupyter notebook command. So cd into the directory where you want it to run from, and issue jupyter notebook there. If that doesn't work, you can try forcing the directory with a command line argument like jupyter notebook --notebook-dir=NEWDIR. Otherwise, there is a global config and a local (per user) one you refer above. If the local is the default, then you probably changed the global config earlier. If you change your local config in ~/.jupyter/jupyter_notebook_config.py to the new value that should override the global config. To clean up the global config, look for it in /etc/jupyter or /usr/local/etc/jupyter/ on Unix or %PROGRAMDATA%\jupyter\ in Windows. You can list the current config paths used with the command jupyter --paths. More info in the manual.
Error connecting jupyter notebook 5.0 in root environment
I've been using jupyter notebook in my root environment and a few other environment for several months. Upgraded to jupyter notebook 5 last week and it worked well until yesterday. Yesterday - computer froze. After restarting, jupyter notebook gives an error (2x) when launched from root environment: (some info replaced with # below) [I 08:57:31.223 NotebookApp] Serving notebooks from local directory: ####### [I 08:57:31.223 NotebookApp] 0 active kernels [I 08:57:31.223 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=######################## [I 08:57:31.223 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 08:57:31.224 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=######################## [I 08:57:32.992 NotebookApp] Accepting one-time-token-authenticated connection from ::1 [I 08:58:01.367 NotebookApp] Kernel started: ########### [I 08:58:02.775 NotebookApp] Adapting to protocol v5.1 for kernel ############ [IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version [IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version I've tried copying and pasting the link provided above. It removed one of the error messages next time it was launched, then 2 error messages after trying to launch again. Jupyter notebook works when launched from a different conda environment. Any thoughts on how to get this working in my root environment again?