1

I am developing a data import script tool for ArcGIS that downloads from an SQL Server into a pandas DataFrame. This python script worked perfectly as I built it in Spyder however now that I am setting it up in a Toolbox, ArcGIS cannot import pandas.

I have tried Installing pandas with Esri's python? on my own however what I am looking to do is automate the process so as soon as the tool is run the script checks for pandas and installs as necessary on any user's machine. I already fixed this similar problem with pypyodbc by storing the necessary setup scripts in the public drive folder where the tool script is located:

import os
import imp
path = os.path.realpath(__file__)
path = path[:-16]
os.chdir(path)
try:
 imp.find_module('pypyodbc')
 found = True
except ImportError:
 found = False
if found == False:
 import setup
 import pypyodbc

I can't seem to apply this method to pandas as there isn't an install/setup script I can save in my public folder. Is there any way to automate the install of pandas from a Script Tool in ArcGIS?

asked Sep 21, 2016 at 0:19
2
  • 1
    To me this sounds like a Python problem that should be asked over at Stack Overflow. It sounds like the ArcGIS Script tool is an aside and really you're wanting to know how to install pandas from python. Once you know how to do this you should be able to do it from ArcGIS. Commented Sep 21, 2016 at 1:40
  • It's actually, imo, pretty ArcGIS specific as any work around needs to be tailored to the ArcGIS interface and the downloaded instance of Python. Commented Sep 21, 2016 at 16:13

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.