Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gurobi库不再加载[Windows]_R_Windows_Gurobi - Fatal编程技术网

Gurobi库不再加载[Windows]

Gurobi库不再加载[Windows],r,windows,gurobi,R,Windows,Gurobi,由于不起作用,我重新安装了。但是没有成功。 我错过了什么 install.packages('C:/gurobi800/win64/R/gurobi_8.0-0.zip', repos=NULL) # package ‘gurobi’ successfully unpacked and MD5 sums checked Sys.getenv() # ... # GRB_LICENSE_FILE C:\gurobi800\gurobi.lic # GUROBI_H

由于不起作用,我重新安装了。但是没有成功。 我错过了什么

install.packages('C:/gurobi800/win64/R/gurobi_8.0-0.zip', repos=NULL)
# package ‘gurobi’ successfully unpacked and MD5 sums checked
Sys.getenv()
# ...
# GRB_LICENSE_FILE                  C:\gurobi800\gurobi.lic
# GUROBI_HOME                       C:\gurobi800\win64
# ...
library("gurobi")
错误:“gurobi”的包或命名空间加载失败:包“gurobi” 由具有不同内部构件的R版本安装;这是必须的 重新安装以用于此R版本

从Gurobi的R文件夹中的描述:

会话信息:

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252    LC_MONETARY=German_Switzerland.1252
[4] LC_NUMERIC=C                        LC_TIME=German_Switzerland.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] slam_0.1-44

loaded via a namespace (and not attached):
[1] compiler_3.5.1  imsbasics_1.9.7 tools_3.5.1     yaml_2.1.19    

看起来您要么需要回到R3.4.4,要么让Gurobi>=8.0.1;因为在R中从3.4.4到3.5.0有很多变化,所以为R版本<3.5.0编译的二进制文件将不能与R>=3.5.0一起工作,所以您的Grubi8.0.0将不能与当前安装的R一起工作

其他古洛比用户也有这个问题;更详细地说,请参见:

当前的Gurobi 8.0.1版为R3.5.X提供了一个R包


如果您希望使用较旧版本的R,而不是较新版本的Gurobi,您可以使用适用于Windows的R3.4.4。

C中的内容:/gurobi800/win64/R/Gurobi_8.0-0.zip-源代码包?二进制文件?我猜它是为R版本<3.5而构建的二进制文件。0@duckmayr查看我的编辑:这是一个包含gurobi/文件夹的文件夹。部分描述可以在编辑中找到,在gurobi/R/文件夹中有gurobi、gurobi.rdx和gurobi.rdb文件。这意味着什么?建成:R3.4.0;您在描述中看到,这意味着它是一个预构建的二进制软件包,而不是您必须编译的源代码包。这使得安装变得更容易、更快,除非你试图安装在一个不兼容的R版本上,这就是这里发生的事情——请看我下面的答案。这个解决方案明显吗?@Christoph我想这取决于你问谁;我想说的是对于典型的用户,不是完全的,但我对这个问题很熟悉,因为我有很多头疼的问题:其他软件包,而不是Gurobi迁移到3.5.0。对于编译过代码的包维护人员来说,这是3.5.0发布时的事情
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252    LC_MONETARY=German_Switzerland.1252
[4] LC_NUMERIC=C                        LC_TIME=German_Switzerland.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] slam_0.1-44

loaded via a namespace (and not attached):
[1] compiler_3.5.1  imsbasics_1.9.7 tools_3.5.1     yaml_2.1.19