如何在windows和mac上安装ENMTools

2018-06-05  本文已影响179人  石博士

windows安装ENMTools

install.packages("rJava") # reinstall if you switch from x64 to x32 R version
library(rJava)
install.packages("devtools") 
library(devtools) 
# install the x64 and x32 version of JDK first, rather than JRE
Sys.setenv(JAVA_HOME="")
Sys.setenv(JAVA_HOME="C:\\Program Files\\Java\\jdk1.8.0_171\\")
# Sys.setenv(JAVA_HOME="C:\\Program Files (x86)\\Java\\jdk1.8.0_171\\") # for 32-bit R version, if the 64-bit is not working


install_github("danlwarren/ENMTools") # 如果出错“Error : object 'descendants' is not exported by 'namespace:phyloclim'”,用develop brach,即:
install_github("danlwarren/ENMTools",ref="develop") 
#提示错误,缺少ecospat包
install.packages(c('ade4', 'adehabitatHR', 'adehabitatMA', 
                   'biomod2', 'ecodist', 'maptools', 'rms', 'MigClim', 'gtools', 
                   'PresenceAbsence', 'classInt')) 
install.packages("C:/Users/18213/Downloads/ecospat_2.2.0.tar.gz", 
                 repos = NULL, type = "source")  # 安装下载的ecospat包, 路径换成你自己的
install_github("danlwarren/ENMTools",ref="develop") 

mac安装ENMTools

install.packages("devtools") 
library(devtools) 
install_github("danlwarren/ENMTools") 
library(ENMTools)
sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
上一篇 下一篇

猜你喜欢

热点阅读