I'm using Jupyter Lab with ancaconda to schedule some Jupyter Notebooks.
I installed jupyterlab_scheduler and when I try to schedule a cronjob I get the error "There was an error submitting job".
My cron syntax is 1 14 * * * and the command for the job is jupyter nbconvert --to notebook --execute C:/Users/charl/conversion rates sdr.ipynb
My log looks like this :
[E 2022-06-06 14:21:15.410 ServerApp] Uncaught exception POST /jupyterlab_scheduler/add?1654539675407 (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri='/jupyterlab_scheduler/add?1654539675407', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "c:\users\charl\anaconda3\lib\site-packages\tornado\web.py", line 1702, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "c:\users\charl\anaconda3\lib\site-packages\tornado\web.py", line 3173, in wrapper
return method(self, *args, **kwargs)
File "c:\users\charl\anaconda3\lib\site-packages\jupyterlab_scheduler\handlers.py", line 114, in post
with CronTab(user=os.environ["USER"]) as cron:
File "c:\users\charl\anaconda3\lib\os.py", line 675, in __getitem__
raise KeyError(key) from None
KeyError: 'USER'
[W 2022-06-06 14:21:15.412 ServerApp] Unhandled error
[E 2022-06-06 14:21:15.414 ServerApp] {
"Host": "localhost:8888",
"Accept": "*/*",
"Referer": "http://localhost:8888/lab",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36"
}
[E 2022-06-06 14:21:15.415 ServerApp] 500 POST /jupyterlab_scheduler/add?1654539675407 (::1)
3.99ms referer=http://localhost:8888/lab
The stack trace is saying that the environment variable USER is not found. USER is defined by default if you are using Linux, but not if you are using Windows.
It appears that the package is designed for Linux users. You can get around this particular issue by defining the USER environment variable manually.
Related
RStudio crashes when opening and produces the failure report below. Did not understand what to do really. How do I solve it?
R Session Startup Failure Report
RStudio Version
RStudio 2022.12.0+353 "Elsbeth Geranium " (7d165dcf, 2022-12-03) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2022.12.0+353 Chrome/102.0.5005.167 Electron/19.1.3 Safari/537.36
Error message
[No error available]
Process Output
The R session exited with code 1.
Error output:
dyld: Library not loaded: #executable_path/../Frameworks/libssl.1.1.dylib
Referenced from: /Applications/RStudio.app/Contents/Resources/app/bin/rsession
Reason: no suitable image found. Did find:
/Applications/RStudio.app/Contents/Resources/app/bin/../Frameworks/libssl.1.1.dylib: cannot load 'libssl.1.1.dylib' (load command 0x80000034 is unknown)
/Applications/RStudio.app/Contents/Resources/app/bin/../Frameworks/libssl.1.1.dylib: stat() failed with errno=1
/Applications/RStudio.app/Contents/Resources/app/bin/../Frameworks/libssl.1.1.dylib: cannot load 'libssl.1.1.dylib' (load command 0x80000034 is unknown)
/Applications/RStudio.app/Contents/Resources/app/bin/../Frameworks/libssl.1.1.dylib: stat() failed with errno=1
Standard output:
[No output emitted]
Logs
/Users/Oz/.local/share/rstudio/log/rsession-Oz.log
27 Jan 2023 00:51:29 [rsession-Oz] ERROR Handle httpd request error: Error : mutate.Rd:134: object 'methods_rd' not found
; LOGGED FROM: void rstudio::session::modules::help::(anonymous namespace)::handleHttpdRequest(const std::string &, const rstudio::session::modules::help::(anonymous namespace)::HandlerSource &, const http::Request &, const Filter &, http::Response *) [Filter = rstudio::session::modules::help::(anonymous namespace)::HelpContentsFilter] src/cpp/session/modules/SessionHelp.cpp:855
01 Feb 2023 00:22:34 [rsession-Oz] ERROR system error 2 (No such file or directory) [path: /Users/Oz/.local/share/rstudio/notebooks/C80BEAAD-bias-in-turnout/1/63BE219BEDFCCF2/chunks.json, target-path: /Users/Oz/.local/share/rstudio/notebooks/C80BEAAD-bias-in-turnout/1/s/chunks.json]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::copy(const rstudio::core::FilePath &, bool) const src/cpp/shared_core/FilePath.cpp:779; LOGGED FROM: void rstudio::session::modules::rmarkdown::notebook::(anonymous namespace)::onDocPendingRemove(boost::shared_ptr<source_database::SourceDocument>) src/cpp/session/modules/rmarkdown/NotebookCache.cpp:249
I was having some problems with my existing RStudio. I deleted and reinstalled it. It did not work and produced the report I post here.
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)
I have some R plumber files working using RStudio, next step is via docker.
The instruction
source('R/to_run_api_shirin_docker.R')
Starting server to listen on port 8000
don't work and gives the following run :
$ docker run -p 8000:8000 plumber_demo:v4
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> source('R/to_run_api_shirin_docker.R')
Starting server to listen on port 8000
Symptoms :
when run in RStudio I should see for logs :
Starting server to listen on port 8000
Running the swagger UI at http://127.0.0.1:8000/__swagger__/
System time: 2020-07-22 16:50:21
Request method: GET /__swagger__/
HTTP user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) enter code hereQtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36 # 127.0.0.1
System time: 2020-07-22 16:50:21
Request method: GET /swagger.json
HTTP user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36 # 127.0.0.1
and there is nothing at
http://127.0.0.1:8000/__swagger__/,
http://127.0.0.1:8000,
http://localhost:8000/swagger/ ,
http://localhost:8000
--- scripts bellow ---
Dockerfile
FROM rocker/r-ver:3.6.3
RUN R -e 'install.packages("plumber")'
RUN R -e 'install.packages("randomForest")'
COPY mod_prod_rf.rds data/
COPY plumber_api_shirin_docker.R /R/
COPY to_run_api_shirin_docker.R /R/
CMD ["R", "-e source('R/to_run_api_shirin_docker.R')"]
R/to_run_api_shirin_docker.R
# --- launch API ----
plumb_path <- "R/plumber_api_shirin_docker.R"
r <- plumber::plumb(plumb_path)
r$run(host = "127.0.0.1", port = 8000)
Thanks in advance for any help !
I had the same problem when starting with a rocker/r-ver docker repository and trying to add and configure plumber. Resolution for me was to start from a rstudio/plumber repository which has been set up by RStudio folks with plumber and the right network configuration. It allows you to remove some boilerplate and the server responded from the docker container as expected.
Your project might look like this:
FROM rstudio/plumber:v1.0.0
RUN R -e 'install.packages("randomForest")'
COPY mod_prod_rf.rds data/
COPY plumber_api_shirin_docker.R /R/
CMD ["/R/plumber_api_shirin_docker.R"]
Changes from your original:
don't need to install plumber since it's in the base repository
you don't need the to_run_api_shirin_docker.R file since it does this for you
CMD argument is just the file with plumber functions
More info from RStudio on their docker deployment guide here
PS. I didn't figure exactly what the original problem was, but note that in the RStudio plumber Docker configuration they host the API explicitly on 0.0.0.0. Output from running is
> pr <- plumber::plumb(rev(commandArgs())[1]); args <- list(host = '0.0.0.0', port = 8000); if (packageVersion('plumber') >= '1.0.0') { pr$setDocs(TRUE) } else { args$swagger <- TRUE }; do.call(pr$run, args)
Running plumber API at http://0.0.0.0:8000
Running swagger Docs at http://127.0.0.1:8000/__docs__/
with cloudera install doc step by step I have in trouble with Install Agents
like this:
It said install failed and can not receive signal.
And I find the log like this:
[13/Nov/2018 16:44:19 +0000] 4306 MainThread agent ERROR Heartbeating to ryze-1.bigdata.com:7182 failed.
Traceback (most recent call last):
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cmf/agent.py", line 1371, in _send_heartbeat
response = self.requestor.request('heartbeat', heartbeat_data)
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 141, in request
return self.issue_request(call_request, message_name, request_datum)
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 254, in issue_request
call_response = self.transceiver.transceive(call_request)
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 483, in transceive
result = self.read_framed_message()
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 489, in read_framed_message
framed_message = response_reader.read_framed_message()
File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/avro/ipc.py", line 417, in read_framed_message
raise ConnectionClosedException("Reader read 0 bytes.")
ConnectionClosedException: Reader read 0 bytes.
I try to solve it with google I already check these setting.
/etc/cloudera-scm-agent/config.ini the port set 7182 and server_host set ryze-1.bigdata.com.
iptable altready shutdown with sudo service iptables stop
ryze-1.bigdata.com is reachable. and telnet ryze-1.bigdata.com 7183 can succeed.
OS: Centos7.4
Platform: AliCloud
So what can I do? Any one can help me ?
I closed the ssl option.
Everything is fine now.......
I installed the El Capitan beta on a spare computer for test purposes to try to identify potential issues before others in our data science team upgrade their day to day machines once the final release is out sometime this fall (Note: I can navigate around Unix but I am far from a Mac programmer). The kernels for python 2 and 3 work just fine, but when I try to load the R kernel I get the following messages:
From within the Jupyter notebook itself I get:
Traceback (most recent call last):
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/base/handlers.py", line 365, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/handlers.py", line 53, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/kernels/kernelmanager.py", line 84, in start_kernel
kernel_name=kernel_name, **kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/multikernelmanager.py", line 112, in start_kernel
km.start_kernel(**kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 240, in start_kernel
**kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/launcher.py", line 213, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'R'
And I get the following error messages in the Terminal.
[E 19:44:58.862 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/base/handlers.py", line 365, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/handlers.py", line 53, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/kernels/kernelmanager.py", line 84, in start_kernel
kernel_name=kernel_name, **kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/multikernelmanager.py", line 112, in start_kernel
km.start_kernel(**kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 240, in start_kernel
**kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/launcher.py", line 213, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'R'
[E 19:44:58.870 NotebookApp] {
"Accept-Language": "en-US,en;q=0.8",
"Content-Length": "72",
"Accept": "application/json, text/javascript, */*; q=0.01",
"Dnt": "1",
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Origin": "http://localhost:8888",
"Referer": "http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=ir",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Host": "localhost:8888",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"
}
[E 19:44:58.870 NotebookApp] 500 POST /api/sessions (::1) 25.54ms referer=http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=ir
[I 20:04:04.914 NotebookApp] Creating new notebook in
[I 20:04:05.707 NotebookApp] Kernel started: 75ef1aa5-453d-4a18-94df-eae30238c688
My first thought was to try to reinstall the R kernel (and its dependencies), but those dependencies must be compiled from their binaries and require Xcode (for which there is not a public beta). Does anyone know of a potential work around for this (or have any ideas about where to start looking)? I'm trying to figure out if this is something we can fix on our own or if we will likely need to wait on an official fix from the Jupyter group. Thanks in advance.
Was able to get this working. Updating to beta messed with the R $PATH as well as homebrew and its dependencies. Taking the following steps has fixed all of the issues I was experiencing.
1) Reinstall Revolution R Open (or your preferred R install. I like RRO because it includes the Intel MKL - Math Kernel Library)
2) Fix Homebrew permissions:
$ sudo chown -R "$USER":admin /usr/local
3) Cleanup Homebrew Install:
$ rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
4) Reinstall Homebew:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
5) Install OS X command line tools (if not already installed):
$ xcode-select --install
6) Install zqm:
$ brew install zmq
7) Launch R in terminal
$R
8) Run the following:
install.packages(c('rzmq','repr','IRkernel','IRdisplay'),
repos = c('http://irkernel.github.io/', getOption('repos')),
type = 'source')
IRkernel::installspec()
Opening a new terminal window and launching jupyter should now work.