R-ArcGIS / r-bridge-install

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

R Integration.pyt "ImportError: DLL load failed: %1 is not a valid Win32 application." #44

Closed fdetsch closed 7 years ago

fdetsch commented 7 years ago

Using ArcGIS Desktop 10.5 (Advanced) on Windows 10 (64-bit), I am experiencing an issue which is quite similar to #14. The R side seems to be setup properly

> arcgisbinding::arc.check_product()
product: ArcGIS Desktop ( 10.5.0.6491 )
license: Advanced

and %USERPROFILE%\Documents\R\win-library\3.2\arcgisbinding has been successfully linked to ...\Desktop10.5\Rintegration (i.e., a folder .\arcgisbinding exists therein) using mklink. But still, R Integration.pyt does not reveal an installation script no matter if ArcGIS has been launched as Admin or not. Here's the output from 'Check Synthax...':

r-arcgis

fdetsch commented 7 years ago

Alright, for future users facing the same problem: I've taken inspiration from a related GeoNet post and was thus able to solve this issue by introducing a PYTHONPATH system environment variable with the following content linking to a) ArcGIS's Python2.7 installation (C:\...) and b) the directory where ArcGIS10.5 is installed (E:\...):

C:\Python27\ArcGIS10.5\DLLs;C:\Python27\ArcGIS10.5\Lib;C:\Python27\ArcGIS10.5\Lib\lib-tk;C:\Python27\ArcGIS10.5;E:\apps\ArcGIS\Desktop10.5\bin;E:\apps\ArcGIS\Desktop10.5\arcpy;E:\apps\ArcGIS\Desktop10.5\ArcToolbox\Scripts