【问题标题】:IRkernel for JupyterJupyter 的 IRkernel
【发布时间】:2018-02-16 23:16:00
【问题描述】:

尝试为 jupyter 设置 R-kernel,但是我收到以下错误, 我按照https://github.com/IRkernel/IRkernel 上的说明进行操作, 但是,它在 install.packages("devtools") 上失败了。

checking for gawk... gawk
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.19.7
checking whether libcurl is usable... no
checking for struct stat.st_mtim... no
checking for struct stat.st_mtimespec... no
checking for struct stat.st_mtime_nsec... no
checking for futimens... no
checking for qsort_r... no
checking for qsort_s... no

  ----- Results of the git2r package configure -----

OpenSSL to talk over HTTPS...........: yes
LibSSH2 to enable the SSH transport..: no

  --------------------------------------------------

configure: creating ./config.status
config.status: creating src/Makevars
** libs
/home/sheetal/software/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -I/home/sheetal/software/anaconda3/lib/R/include -DNDEBUG -I. -Ilibgit2/src -Ilibgit2/include -Ilibgit2/deps/http-parser     -D_FORTIFY_SOURCE=2 -O2 -I/home/sheetal/software/anaconda3/include -DGIT_ARCH_64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DGIT_OPENSSL -DLIBGIT2_NO_FEATURES_H -DGIT_SHA1_OPENSSL -DGIT_USE_NSEC   -D_FORTIFY_SOURCE=2 -O2 -I/home/sheetal/software/anaconda3/include   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/home/sheetal/software/anaconda3/include  -c git2r.c -o git2r.o
make: /home/sheetal/software/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc: Command not found
make: *** [git2r.o] Error 127
ERROR: compilation failed for package ‘git2r’
* removing ‘/home/sheetal/software/anaconda3/lib/R/library/git2r’
ERROR: dependency ‘git2r’ is not available for package ‘devtools’
* removing ‘/home/sheetal/software/anaconda3/lib/R/library/devtools’

The downloaded source packages are in
    ‘/tmp/RtmpJ1BaT2/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("devtools") :
  installation of package ‘git2r’ had non-zero exit status
2: In install.packages("devtools") :
  installation of package ‘devtools’ had non-zero exit status

【问题讨论】:

  • 尝试更新libcurl(当前为7.58.0)和/或安装libssh2
  • 如何更新 libcurl?我安装了 libssh2
  • 可能是你的包管理器,如果你在 linux 上
  • 我跑了,curl --version。它给出了输出 curl 7.55.1 (x86_64-conda_cos6-linux-gnu) libcurl/7.55.1 OpenSSL/1.0.2n zlib/1.2.11 libssh2/1.8.0。它显示 libcurl 版本 7.55.1
  • 那么它现在给出的错误信息是什么?如果一切看起来都一样,则说明库没有安装在 $PATH 上的位置。

标签: r linux jupyter-notebook devtools


【解决方案1】:

据我所知,安装 IRkernel 的最佳方法是使用 anaconda。 在我的 mac(我猜在 Linux 和 Windows 上是一样的)我输入:

conda install -c r r-irkernel

然后我开始开始 R 打字:

R

最后,我安装了 kernelspec 来告诉 Jupyter IRkernel,在全局环境中安装选项 user=FALSE:

IRkernel::installspec(user=FALSE)

希望对你有帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多