gpt4 book ai didi

r - Jupyter 的 IRkernel

转载 作者:太空宇宙 更新时间:2023-11-04 12:11:19 24 4
gpt4 key购买 nike

尝试为 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

最佳答案

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

conda install -c r r-irkernel

然后我开始用 R 打字:

R

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

IRkernel::installspec(user=FALSE)

希望对您有所帮助!

关于r - Jupyter 的 IRkernel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48836196/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com