错误: Failed to install 'IRkernel' from GitHub: Send failure: Connection was reset。


问题再现

想通过以下命令安装 IRkernel

devtools::install_github('IRkernel/IRkernel')

但得到错误提示:

Failed to install 'IRkernel' from GitHub:   Send failure: Connection was reset

Failed to install 'unknown package' from GitHub

解决

首先,这个问题在于网络不允许使用GitHub,连接不到该站点。因此,可以离线安装。

  • 首先去官网 https://github.com/IRkernel/IRkernel 下载zip文件,后解压。
  • 打开CMD。再cd到该文件夹后,输入R,进入R环境(若提示找不到R命令,则先去降R的bin加入到系统path中)。
  • 先build(),再install(),最后 IRkernel::installspec() 激活。
  • 再使用jupyter的时候,就可以用R环境的了。

参考:
https://zhuanlan.zhihu.com/p/46799561
https://kbroman.org/pkg_primer/pages/build.html


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM