简体   繁体   English

R TCLTK未在Windows上加载

[英]R TCLTK not loading on windows

I have installed R on countless windows machines and never had a problem with the tcltk package until now. 我已经在无数Windows机器上安装了R,并且直到现在都没有tcltk软件包的问题。 I have freshly installed R 3.3.2 onto Windows 10 Pro v1607 and can't load tcltk. 我刚刚在Windows 10 Pro v1607上安装了R 3.3.2,无法加载tcltk。 I used the windows install binaries from CRAN, so no custom builds. 我使用了CRAN的Windows安装二进制文件,因此没有自定义版本。

capabilities("tcltk")

returns TRUE. 返回TRUE。 When I try to load tcltk: 当我尝试加载tcltk时:

library("tcltk")

I get: 我得到:

Error : .onLoad failed in loadNamespace() for 'tcltk', details:
  call: inDL(x, as.logical(local), as.logical(now), ...)
  error: unable to load shared object 'C:/Program Files/R/R-3.3.2/library/tcltk/libs/x64/tcltk.dll':
  LoadLibrary failure:  The specified module could not be found.

Error: package or namespace load failed for ‘tcltk’

Navigating to the location of the DLL confirms that it is there. 导航到DLL的位置,确认它在那里。 This fails when calling both x64 and i386 versions of R. I have tried running as admin and same thing. 当同时调用x64和i386版本的R时,此操作将失败。我尝试以admin和同一身份运行。 I also tried rolling back to version 3.3.1 and had the same issues. 我还尝试了回滚到3.3.1版,并遇到了同样的问题。

This PC has an AMD FX-8120 processor. 该PC具有AMD FX-8120处理器。

I couldn't find much on R tcltk problems on Windows. 我在Windows上找不到很多关于R tcltk的问题。 Any ideas would be great. 任何想法都很棒。 Cheers 干杯

EDIT: added info: 编辑:添加的信息:

R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

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

loaded via a namespace (and not attached):
[1] tools_3.3.2

To fix the problem do the following tests: 要解决此问题,请执行以下测试:

Test the Tcl/Tk installation of R: 测试R的Tcl / Tk安装:

  1. Find and start wish85.exe which is contained in one of the sub folders of the R installation ("85" is the version number and my differ depending on your R version). 查找并启动R安装的一个子文件夹中包含的wish85.exe (“ 85”是版本号,我的不同取决于您的R版本)。

  2. An empty Tk window must pop up and a tcl/tk console must open. 必须弹出一个空的Tk窗口,并且必须打开一个tcl / tk控制台。 If not the installation is damaged or parts have been deleted (reinstall it) 如果不是,则说明安装损坏或部件已删除(重新安装)

Check if R is using the right Tcl/Tk version: 检查R是否使用正确的Tcl / Tk版本:

  1. Check the value of the environment variable MY_TCLTK 检查环境变量MY_TCLTK的值

  2. If it is defined: Does the path point to the bin folder of Tcl/Tk? 如果已定义:路径是否指向Tcl / Tk的bin文件夹? If not: Fix it. 如果不是:修复它。

    If it is not defined: It should work out of the box but you could set the value to the bin folder. 如果未定义:它应该是开箱即用的,但是您可以将值设置为bin文件夹。

Source: 资源:

https://mirrors.dotsrc.org/cran/bin/windows/base/rw-FAQ.html#Package-TclTk-does-not-work_002e https://mirrors.dotsrc.org/cran/bin/windows/base/rw-FAQ.html#Package-TclTk-does-not-work_002e

MY_TCLTK was defined as "Yes" in my environment variables. 在我的环境变量中, MY_TCLTK被定义为“是”。 I changed it to the location of the tcl exe that was installed with R and it works now. 我将其更改为随R一起安装的tcl exe的位置,现在可以正常工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM