@echo off set path=C:\Python27\ArcGISx6410.1;%path% set PYTHONPATH=C:\Python27\ArcGISx6410.1\Lib\site-packages\;C:\Python27\Lib\;C:\Python27\Lib\site-packages\;%pythonpath% C:\Python27\ArcGISx6410.1\python.exe -c "import sys; from IPython.frontend.terminal.ipapp import launch_new_instance; sys.exit(launch_new_instance())" %* exit /B %ERRORLEVEL%
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. >>>
>>> import sys >>> sys.executable 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin\\ArcMap.exe' >>>
Solved! Go to Solution.
# My startup file import sys print 'using ', file if sys.executable in ['C:\\Python27\\ArcGIS10.1\\python.exe', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin\\ArcMap.exe']: print('Resetting Path') sys.path = [ #python32 for ESRI 'C:\\windows\\system32\\python27.zip', 'C:\\Python27\\ArcGIS10.1\\DLLs', 'C:\\Python27\\ArcGIS10.1\\lib', 'C:\\Python27\\ArcGIS10.1\\lib\\plat-win', 'C:\\Python27\\ArcGIS10.1\\lib\\lib-tk', 'C:\\Python27\\ArcGIS10.1', 'C:\\Python27\\ArcGIS10.1\\lib\\site-packages', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\arcpy', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\ArcToolbox\\Scripts', #defaults 'C:\\Python27\\Lib\\', 'C:\\Python27\\Lib\\site-packages', 'C:\\pythonnet' ] import arcpy from arcpy import env import numpy import time env.overwriteOutput = True
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
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
>>> 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'] >>>
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. >>>
# My startup file import sys print 'using ', file if sys.executable in ['C:\\Python27\\ArcGIS10.1\\python.exe', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin\\ArcMap.exe']: print('Resetting Path') sys.path = [ #python32 for ESRI 'C:\\windows\\system32\\python27.zip', 'C:\\Python27\\ArcGIS10.1\\DLLs', 'C:\\Python27\\ArcGIS10.1\\lib', 'C:\\Python27\\ArcGIS10.1\\lib\\plat-win', 'C:\\Python27\\ArcGIS10.1\\lib\\lib-tk', 'C:\\Python27\\ArcGIS10.1', 'C:\\Python27\\ArcGIS10.1\\lib\\site-packages', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\arcpy', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\ArcToolbox\\Scripts', #defaults 'C:\\Python27\\Lib\\', 'C:\\Python27\\Lib\\site-packages', 'C:\\pythonnet' ] import arcpy from arcpy import env import numpy import time env.overwriteOutput = True