3

I followed the very clear directions in the answer to Installing pandas with Esri's python? and created the Esri101 build and added a "conda.pth" file to my C:\Python27\ArcGIS10.2\Lib\site-packages\conda.pth

and in the conda.pth file I pasted the location of my Esri101 build with no quotes When I open ArcMap or the Python27 IDLE and type ">>> import pandas" I get the resulting error:

DLL load failed: %1 is not a valid Win32 application.

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
   import pandas
 File "C:\Anaconda\envs\esri101\Lib\site-packages\pandas\__init__.py", line 6, in <module>
from . import hashtable, tslib, lib
ImportError: DLL load failed: %1 is not a valid Win32 application.

Quick check online makes me think this might have something to do with running a 64-bit anaconda and a 32 bit ArcGIS.

0

2 Answers 2

5

I did not figure out how to get the Anaconda to link to ArcMap Python27, I think I need to add a second 32 bit version of Anaconda but don't want to mess with my 64-bit Anaconda install.

I did get pandas installed on the ArcGIS python27 (2.7.5) that comes with Arcmap 10.2.2

First: I modified my system variables temporarily to make the Arcgis Python be the default. In Right Click Computer -> Properties -> Advanced System Settings -> Advanced -> Environment Variables -> System Variables

I removed the default Anaconda path (saving it in a text file for later) which looked like this
C:\Anaconda;C:\Anaconda\Scripts;
I then added this path C:\Python27\ArcGIS10.2;C:\Python27\ArcGIS10.2\Scripts;

Go to terminal, double check that when you enter python it says python 2.7.5.

Second: Then I needed to install setup_tools for this version of python.

Third: Then in the command prompt I entered >> easy_install pandas==0.10.1 (the current version failed when I tried to install it)

Check if "import pandas" works in IDLE 2.7.5 , IT DID!

Finally: I changed my python system path back to the original Anaconda path (I use Spyder and Anaconda independently of Arcmap often, so this was important for me).

0

I am not sure when this was added but I just tested importing pandas into the IDLE that gets installed as part of ArcGIS Desktop 10.6, and it looks like pandas is now part of the standard install.

Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import arcpy
>>> import pandas
>>> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.