R-ArcGIS / r-bridge-install

Install the R ArcGIS Tools
Apache License 2.0
188 stars 59 forks source link

Could not bind to a valid ArcGIS installation #1

Closed jeffreyhanson closed 8 years ago

jeffreyhanson commented 9 years ago

Hi,

I'm really excited to start using the R package.

I installed the arcgisbinding R package following the instructions using ArcCatalog, but when I run arc.check_product() it incorrectly yields "could not bind to a valid ArcGIS installation".

Also, the first time I tried loading the R package a dialogue appeared tell me that the MSVCP110.dll was missing. I installed it from here and then was able to successfully load the package.

Cheers,

Jeff

code

> library(arcgisbinding)
*** Please call arc.check_product() to  define a desktop license.
> arc.check_product()
Error in .call_proxy("arc_AoInitialize") : 
  Could not bind to a valid ArcGIS installation

ArcGIS info from ArcGIS Administrator

DESKTOP

Installation Information
Product Name: ArcGIS 10.3 for Desktop
Release Version: 10.3
Product Version: 10.3.0.4322
Installation Folder: C:\Program Files (x86)\ArcGIS\Desktop10.3\
Installed By: xxxx
Install Date: 6/05/2015
Install Time: 11:35:59
Install Image: C:\Users\xxxx\Documents\ArcGIS 10.3\Desktop\SetupFiles\
Current User: xxxx
Application Data Folder: C:\Users\xxx\AppData\Roaming
System Temporary Folder: C:\Users\xxxx\AppData\Local\Temp\

Service Pack Information
ArcGIS Service Pack: 0 (build 0)

License Manager Environment Variable Information
ARCGIS_LICENSE_FILE: N/A
LM_LICENSE_FILE: N/A

R session info

R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

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

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

other attached packages:
[1] arcgisbinding_1.0.0.111

loaded via a namespace (and not attached):
[1] tools_3.2.1
scw commented 9 years ago

Thanks for the report, we're also excited about this project.

From what I can tell, it looks like the ArcGIS installation that it's trying to connect to is 10.3.0 (build 4322). Unfortunately, this is a very new project, and requires ArcGIS 10.3.1 (build 4959), which was released in May. I'll look at the code tomorrow and see if we can add a more helpful error message for this issue than the current generic failure.

Thanks also for the report about the missing MSVC DLL file, I'll do some more testing on a bare machine to make sure we have better instructions.

Cheers, Shaun

dpavlushko commented 9 years ago

Please run Rgui.exe 32-bit or setup RStudio to use R (32-bit). To build and run GP tools please upgrade to ArcGIS 10.3.1

jeffreyhanson commented 9 years ago

Thanks for getting back so quickly! I've contacted my IT department to upgrade ArcGIS. I'll report back once its finished.

lishalongfa commented 9 years ago

can you use the R with 10.3.0.4322 ? I installed the arcgisbinding R successfully. But when I run the samples, no results was shown even the message said this was completed and succeeded.

scw commented 9 years ago

@lishalongfa Unfortunately, the bridge requires ArcGIS 10.3.1 or later to work, as mentioned in the prerequisites. At 10.3.0, you can however use the arcgisbinding library from R, if you know how to use R in a command line context, for accessing data stored in ArcGIS. See the package documentation for details about the library.

scw commented 8 years ago

The installation will now report that it requires 10.3.1 when trying to install on earlier versions (https://github.com/R-ArcGIS/r-bridge-install/commit/226b747d857414ca2e48c558614334644a32737b).

scw commented 8 years ago

@paleo13 The issue with MSVCR has been resolved, the bridge now statically links to the needed Visual C++ Runtime, and these errors shouldn't crop up. We've also fixed the toolbox incorrectly installing on 10.3.0, since it can't be used there as a GP tool. However, as mentioned earlier in this thread, it can be used in standalone R by installing the arcgisbinding package directly into R.

priscole commented 8 years ago

I have ArcMap 10.3.1. Before attempting the bridge, I decided to update R to the latest version, which currently is: 3.2.4 Revised. I downloaded the zip from github, unpacked, and stored with the rest of my R libraries. When I tried to install I got the following warning and error messages:

>install.packages("arcgisbinding")
Warning in install.packages :
  package ‘arcgisbinding’ is not available (for R version 3.2.4 Revised)
> library(arcgisbinding)
*** Please call arc.check_product() to  define a desktop license.
> arc.check_product()
Error in .call_proxy("arc_AoInitialize") : 
  Could not bind to a valid ArcGIS Pro installation
priscole commented 8 years ago

UPDATE

I had an older version of R installed on my computer, so I experimented switching to that version:

R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

This appeared to work:

> library(arcgisbinding)
*** Please call arc.check_product() to  define a desktop license.
> arc.check_product()
product: ArcGIS Desktop 
license: Advanced 
build number: 10.3.1.4959 
binding dll: rarcproxy

However, now dpylr is complaining with this older version of R. Maybe I need to hunt down an older version of dplyr? Is there a version of R that is compatible with all of these R packages?

> library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
    filter, lag
The following objects are masked from ‘package:base’:
    intersect, setdiff, setequal, union
Warning message:
package ‘dplyr’ was built under R version 3.2.4 
scw commented 8 years ago

Hello @priscole,

One of the idiosyncrasies of R is that it lets you install multiple versions -- even within the same minor release as you mention above. By default, when the bridge is installed, it'll try to connect to whatever version it finds. When you installed the second copy (3.2.4), ArcGIS is still configured to look at the 3.2.2 version. If you rerun the install tool, it should make the connection to the most recently installed version, and arcgisbinding will work in both 3.2.2 and 3.2.4. Assuming you don't need to keep 3.2.2 around, you may want to just remove it, then rerun the 'Install R Bindings' tool. As you found, you can just move around the package from the R side, but ArcGIS also has to know where to find the correct version of R -- running that script takes care of that step.

Lastly, that warning is harmless -- R packages are pretty much universally compatible within the same minor release, so while irksome to see that message, dplyr should work just fine under 3.2.2, if you want to keep using that version for working with ArcGIS.

Cheers, Shaun

scw commented 8 years ago

@priscole,

We've identified a bug in the detection logic that lives in Pro / 10.4 that specifically affects the 3.2.4 Revised release (typically, releases don't have a suffix, and are purely dot-separated numeric values). We've applied a fix to the installer that should resolve this issue in this case if you do want to use 3.2.4 Revised.

CodeQL-zz commented 8 years ago

Thank you for your reply. I've succeeded in installing R-bridge. But there's another problem. So close this time.Still failed.

library(arcgisbinding) *\ Please call arc.check_product() to define a desktop license. arc.check_product() Error in .call_proxy("arc_AoInitialize") : Could not bind to a valid ArcGIS Pro installation

scw commented 8 years ago

@CodeQL What version of ArcGIS are you trying to work with? If you have ArcGIS Desktop, you'll need to use the 32-bit version of R as shown in this diagram: https://github.com/R-ArcGIS/r-bridge-install/blob/master/img/version-block-detailed.png

If you are using ArcGIS Pro, could you check that you're logged in correctly in the app, and if possible, send on what you see from the "About ArcGIS Pro > Licensing" screen.

CodeQL-zz commented 8 years ago

Problem solved ,LOL. Much thanks. I didn't notice that my ArcGIS desktop is 32 bit. I just clicked the download button from arcgis.com website. Thougth it would choose the software version corresponding to my operating system WHICH is 64-bit.