9

I am trying to follow this guide to get R as a usable language in jupyter notebook.

The first step is to run:

install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))

But even after running this command, I still cannot execute the next step:

devtools::install_github('IRkernel/IRkernel')

returning the error:

Error in loadNamespace(name) : there is no package called ‘devtools’

If you look at the comment section of the link I posted someone else seems to also have run into this problem.

Update: Scott Richie suggested I rerun install.packages('devtools') this returned:

The downloaded source packages are in
        ‘/tmp/RtmpgBI8IU/downloaded_packages’
Warning messages:
1: In install.packages("devtools") :
  installation of package ‘curl’ had non-zero exit status
2: In install.packages("devtools") :
  installation of package ‘openssl’ had non-zero exit status
3: In install.packages("devtools") :
  installation of package ‘git2r’ had non-zero exit status
4: In install.packages("devtools") :
  installation of package ‘httr’ had non-zero exit status
5: In install.packages("devtools") :
  installation of package ‘gh’ had non-zero exit status
6: In install.packages("devtools") :
  installation of package ‘usethis’ had non-zero exit status
7: In install.packages("devtools") :
  installation of package ‘devtools’ had non-zero exit status

UPDATE 2:

I read up on related threads and was able to get devtools. but I ran into the problem:

> IRkernel::installspec()
Error in IRkernel::installspec() : 
  jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 1.

This other thread had exited with code 127 and none of the solution did not work in my case. : jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127

Qwertford
  • 1,039
  • 2
  • 14
  • 25
  • 5
    Did you check the output of your `install.packages()` command? There was probably an error somewhere. Check again running just `install.packages('devtools')`. – Scott Ritchie Nov 13 '18 at 13:45
  • I just ran it again and i think you're right, this is the problem. im updating my post now with the error message. – Qwertford Nov 13 '18 at 13:46
  • What system are you on? – iod Nov 13 '18 at 13:54
  • Possible duplicate of [installation of package ‘devtools’ had non-zero exit status in a powerpc](https://stackoverflow.com/questions/31114991/installation-of-package-devtools-had-non-zero-exit-status-in-a-powerpc) – iod Nov 13 '18 at 13:55
  • Also potential duplicate of https://stackoverflow.com/questions/20923209/problems-installing-the-devtools-package – iod Nov 13 '18 at 13:55
  • Im on the latest Lubuntu 18.10 AMD64 – Qwertford Nov 13 '18 at 13:57

1 Answers1

0

One quick and simple solution I found is :

  1. Open Anaconda Navigator

  2. Open The environment you are working with.

  3. Go to not installed and then search Dev tools, you should see "r-dev tools" select that.

  4. Click Apply and you are done.