包装' rJava'无法加载

时间:2016-04-04 12:17:02

标签: r rjava

我无法用R上的rjava解决我的问题。

当我安装rJava包并要求它时,我没有问题。

1) Edit -> Profile Preferences
2) Select "Title and Command"
3) check "Run command as a login shell"
4) restart terminal

当我编译最后一行时,我遇到了这个问题:

install.packages("devtools")
install.packages("rJava")
library(rJava)
Sys.setenv(JAVA_HOME="C:/Program Files (x86)/Java/jre1.8.0_77")

devtools::install_github("kassambara/r2excel",INSTALL_opts="--no-multiarch")

我尝试使用32位R.但没有变化!

另一个名为' xlsx'需要rJava来运行我可以使用它..我不明白为什么......

* installing *source* package 'r2excel' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: inDL(x, as.logical(local), as.logical(now), ...)
  error: impossible de charger l'objet partagé 'C:/Users/itm/Documents/R/win-library/3.2/rJava/libs/x64/rJava.dll':
  LoadLibrary failure:  %1 n’est pas une application Win32 valide.

Error : package 'rJava' could not be loaded
Erreur : le chargement a échoué
Exécution arrêtée
ERROR: loading failed for 'x64'
* removing 'C:/Users/itm/Documents/R/win-library/3.2/r2excel'

谢谢你的帮助

1 个答案:

答案 0 :(得分:2)

因为您使用的JDK是32位,所以从Oracle Website重新安装64位

然后做:

import turtle

def position(x, y):
    print x, y

wn = turtle.Screen()
wn.bgcolor("lightgreen")
tess = turtle.Turtle()
tess.color("blue")
tess.shape("turtle")

wn.onscreenclick(position)
相关问题