Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
131 views
in Technique[技术] by (71.8m points)

How do I make the R kernel available to jupyter?

I have read multiple articles along this line, but they all use conda to install R. I am not using conda; I have Windows Subsystem for Linux installed. I was successfully able to install Python, create a virtual environment, and install and run jupyter notebook in that virtual environment.

I installed R in WSL, then activated my virtual environment and ran R with "sudo R" because I was getting a permissions issue. I was able to install IRkernel, but I get an error when I run this:

IRkernel::installspec(user=FALSE)

The error message is: "jupyter-client has to be installed but 'jupyter kernelspec --version' exited with code 127".

I thought it might be a path error, so I used this:

Sys.setenv(PATH="everything from getenv:/path-to-virtual-env/bin")

Tried using installspec again but got the same 127 error.

I'm concerned that it might be because of where I put my virtual environment. To access your files on Windows from within WSL, you have to go to "/mnt/c/Users/your-username/". That's where my virtual environment is, and I'm wondering if that's why R can't see it even when I explicitly tell R where it is. Any help is appreciated.

question from:https://stackoverflow.com/questions/65925597/how-do-i-make-the-r-kernel-available-to-jupyter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...