Thanks for the responses.I do certainly have Python installed natively... and use it heavily. My environment variables are as follows:
PATH=C:\Python27;C:\Python27\ArcGISx6410.1;C:\Python27\Scripts;C:\Python27\Lib\site-packages\django\bin
PYTHONPATH=C:\Python27\Lib\;C:\Python27\Lib\site-packages\;C:\pythonnet
pythonExePath=C:\Python27\ArcGISx6410.1\python.exe
Everything 'arcpy' and python related work fine if I work from Ipython **outside** of ArcMap. It is only the python window inside arcmap that fails. I've posted the full traceback below, but the problem is clear -- it is trying to load 64bit DLLs. But how do I change the behavior of this python instance inside ArcMap?? Is this IronPython?? I shouldn't have to change environment variables (that will break other things) just to get python to work inside ESRI products. (though I did try and it still did not work)If I look at the sys.path inside ArcMap python it is clear it is reading my env variables (e.g. C:\pythonnet), but it is also adding it's own. It doesn't seem to be reading the PATH variable at all. It is strange that it inserted the arcpy path in position 1, ahead of pythonnet, but after python27/lib.
>>> sys.path
['C:\\Python27\\Lib', u'c:\\program files (x86)\\arcgis\\desktop10.1\\arcpy', 'C:\\Python27\\Lib\\site-packages', 'C:\\pythonnet', 'C:\\windows\\system32\\python27.zip', 'C:\\Python27\\ArcGIS10.1\\Lib', 'C:\\Python27\\ArcGIS10.1\\DLLs', 'C:\\Python27\\ArcGIS10.1\\Lib\\lib-tk', 'C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\ArcGIS', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin', 'C:\\Python27\\ArcGIS10.1', 'C:\\Python27\\ArcGIS10.1\\lib\\site-packages', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\arcpy', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\ArcToolbox\\Scripts']
>>>
So again, I'm stumped... insights welcome.--johnFULL Traceback:
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "\\energycorp.com\Statkraft\users\Users01\u35888\ArcGIS\arc_startup.py", line 2, in <module>
import arcpy
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in <module>
from arcpy.toolbox import *
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 342, in <module>
from management import Graph, GraphTemplate
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 22, in <module>
import _management
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_management.py", line 14, in <module>
import _graph
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_graph.py", line 27, in <module>
import numpy
File "C:\Python27\Lib\site-packages\numpy\__init__.py", line 147, in <module>
import add_newdocs
File "C:\Python27\Lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "C:\Python27\Lib\site-packages\numpy\lib\__init__.py", line 4, in <module>
from type_check import *
File "C:\Python27\Lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "C:\Python27\Lib\site-packages\numpy\core\__init__.py", line 5, in <module>
import multiarray
ImportError: DLL load failed: %1 is not a valid Win32 application.
>>>