@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.
Were you able to figure out which specific PATH value was required to get you up and running? Surely not all of those...
I want to say the steps you've taken are not normal.
On a brand new machine after you install Desktop, and 64-bit Background, thats it. No environment variables, no Python path settings, nothing like you've needed to do.
... it all just works.
1) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\arcpy',
to get 'arcpy' to import
2) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin',
to get pythonaddins to import
3) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\ArcToolbox\\Scripts'
to get some toolboxes / my custom Addin working
Your path is set up to import the wrong Python (notice you are running 64 bit python and the arcpy path that fails is the 32 bit ArcGIS python). The easiest solution is to set up pythonwin to start up the 32-bit python shipped with ArcGIS, in your case: C:\python27\arcgis10.1\python.exe
If you must have 64 bit Python (including, say the x64 background geoprocessing), you should have python launch from C:\python27\arcgis10.1x64\python.exe
Unless you have a specific special need for 64 bit, I recommend using the 32 bit arcpy, as the 64 bit has some limitations and of course is not the same one you access from the ArcMap python command line.
UPDATE: On more reflection, I think you can fix this issue easily by uninstalling PythonWin and then downloading and installing the 32-bit PythonWin instead of the 64-bit version. Just that one change should solve the problem for you.