AnsweredAssumed Answered

Specify Python Version for a Python Toolbox (.pyt)

Question asked by HandsomePete on Sep 24, 2014
Latest reply on Oct 17, 2014 by HandsomePete

I'm writing a python toolbox (.pyt) and almost every machine it's going to go on has been upgraded from ArcDesktop 10.0 to 10.2.x.  There are two python directories on the C: drive, one for 2.6 and one for 2.7 (named Python26 and Python27).  Every once in a while the python toolbox will have the red X over it signifying a syntax error, even though I haven't edited it.  The error states:


AttributeError: 'module' object has no attribute 'da'


I'm pretty sure the problem is the toolbox is referring to the older version of python that's still on the computer (and it can't fine the Data Access (da) module in the newer version).  Is there any way in the python code itself to specify to use the 2.7 version?  I don't have any sort of elevated rights on the machines this will go on.