<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem importing arcpy in ArcMap console -- 64 bit DLL conflict in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456851#M35899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Working on Windows 7 with ArcGIS 10.1 using the 64 bit geoprocessing python... I have been having problems with using python **inside** ArcMap. Outside of ArcMap, I can run the ArcGISx6410.1/python.exe without problems. Here is my WORKING case:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpython.bat which will launch 64 bit python and use 64 bit libraries/modules and wraps everything in Ipython.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;@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%&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With this, I get an Ipython window and all arcpy functionality with no errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when I launch the python console inside of ArcMap I get a traceback with the following ultimate error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\lib\type_check.py", line 8, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy.core.numeric as _nx &amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\core\__init__.py", line 5, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; import multiarray ImportError: DLL load failed: %1 is not a valid Win32 application. &amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So clearly, it's a problem with the 64 bit imports. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have my PYTHONPATH set to point to my 64 bit libraries, and I've defined a pythonExePath to point to the ArcGISx6410.1/python.exe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm stumped, because I don't understand how to control which python executable is called from **WITHIN** Arcmap. Output from the console only provides this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; import sys &amp;gt;&amp;gt;&amp;gt; sys.executable&amp;nbsp; 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin\\ArcMap.exe' &amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please advise on how to instruct the console to use the ArcGISx6410.1/python.exe because that seems to be the problem...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;john&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Mar 2013 08:35:52 GMT</pubDate>
    <dc:creator>JohnBurkhart1</dc:creator>
    <dc:date>2013-03-05T08:35:52Z</dc:date>
    <item>
      <title>Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456851#M35899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Working on Windows 7 with ArcGIS 10.1 using the 64 bit geoprocessing python... I have been having problems with using python **inside** ArcMap. Outside of ArcMap, I can run the ArcGISx6410.1/python.exe without problems. Here is my WORKING case:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpython.bat which will launch 64 bit python and use 64 bit libraries/modules and wraps everything in Ipython.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;@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%&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With this, I get an Ipython window and all arcpy functionality with no errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when I launch the python console inside of ArcMap I get a traceback with the following ultimate error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\lib\type_check.py", line 8, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy.core.numeric as _nx &amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\core\__init__.py", line 5, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; import multiarray ImportError: DLL load failed: %1 is not a valid Win32 application. &amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So clearly, it's a problem with the 64 bit imports. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have my PYTHONPATH set to point to my 64 bit libraries, and I've defined a pythonExePath to point to the ArcGISx6410.1/python.exe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm stumped, because I don't understand how to control which python executable is called from **WITHIN** Arcmap. Output from the console only provides this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; import sys &amp;gt;&amp;gt;&amp;gt; sys.executable&amp;nbsp; 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin\\ArcMap.exe' &amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please advise on how to instruct the console to use the ArcGISx6410.1/python.exe because that seems to be the problem...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;john&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 08:35:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456851#M35899</guid>
      <dc:creator>JohnBurkhart1</dc:creator>
      <dc:date>2013-03-05T08:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456852#M35900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not entirely certain of your setup/configuration, but I can say this: inside ArcMap, Python is 32bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not really sure how you're seeing that error from the Python window. I tried changing a few settings on my machine to my 64bit Python and my PyWindow continues to work fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont know much about IronPy and the settings you've shown in regards to that - I dont imagine that its a problem though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing strange about the messages you've posted are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;File "C:\Python27\Lib\site-packages\numpy\lib\type_check.py", line 8, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy.core.numeric as _nx
&amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\core\__init__.py", line 5, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import multiarray&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The directory is pointing at c:\Python27\lib&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My guess here is either you've installed your own Python27 prior to installing Desktop (as well as matplotlib and numpy) or did you just change the directory it installs to while installing Destkop?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the first (you installed it) - is it possible there isn't a complete link between Desktop and Python and (again I cant imagine how) Desktop is now falling through to the only Python it can find - the 64bit one?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just checking: everything inside Desktop/Python window works fine before installing 64bit Background Processing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:20:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456852#M35900</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2021-12-11T20:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456853#M35901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That error message (ImportError: DLL load failed: %1 is not a valid Win32 application) sounds familiar: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/78704-Python-subprocess-module-and-64-bit-background-geoprocessing-in-v10.1?p=276831&amp;amp;viewfull=1#post276831"&gt;http://forums.arcgis.com/threads/78704-Python-subprocess-module-and-64-bit-background-geoprocessing-in-v10.1?p=276831&amp;amp;viewfull=1#post276831&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I fixed my issue (which may be a bit different from yours) by permanently including a 'PATH' envr variable pointing to the 64-bit Python directory (Note that PATH does not include a ref to the 32-bit version directory). My Python window in ArcMap loads arcpy (32-bit) just fine... but I never noticed that it didn't.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 23:02:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456853#M35901</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-03-05T23:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456854#M35902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the responses.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do certainly have Python installed natively... and use it heavily. My environment variables are as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
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
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;gt;&amp;gt;&amp;gt; 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']
&amp;gt;&amp;gt;&amp;gt; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So again, I'm stumped... insights welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--john&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FULL Traceback:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "\\energycorp.com\Statkraft\users\Users01\u35888\ArcGIS\arc_startup.py", line 2, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy.toolbox import *
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 342, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from management import Graph, GraphTemplate
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 22, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import _management
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_management.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import _graph
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_graph.py", line 27, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy
&amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\__init__.py", line 147, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import add_newdocs
&amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\add_newdocs.py", line 9, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from numpy.lib import add_newdoc
&amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\lib\__init__.py", line 4, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from type_check import *
&amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\lib\type_check.py", line 8, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy.core.numeric as _nx
&amp;nbsp; File "C:\Python27\Lib\site-packages\numpy\core\__init__.py", line 5, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import multiarray
ImportError: DLL load failed: %1 is not a valid Win32 application.
&amp;gt;&amp;gt;&amp;gt; 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:20:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456854#M35902</guid>
      <dc:creator>JohnBurkhart1</dc:creator>
      <dc:date>2021-12-11T20:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456855#M35903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;John,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just came across this thread, maybe give it a read: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/75553-SOLVED-Error-8273-geoprocessing-services-crashing-on-SOM-start-and-not-restarting"&gt;http://forums.arcgis.com/threads/75553-SOLVED-Error-8273-geoprocessing-services-crashing-on-SOM-start-and-not-restarting&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;In short &amp;gt; check your registry to see where your system "thinks" Python lives...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 14:33:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456855#M35903</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-03-06T14:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456856#M35904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've never used Iron Python, but that may be a likely reason things are going wrong for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For what it's worth, my PATH variables/values:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PATH = c:\oracle\product\11.2.0\client_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;&lt;/SPAN&gt;&lt;STRONG style="text-decoration: underline;"&gt;C:\Python27\ArcGISx6410.1&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's interesting to note that my PATH (but only after I edited it to include a ref to C:\Python27\ArcGISx6410.1) is the ONLY envr system varaiable that makes reference to anything Python. I assume everything else is handled in the registry... My machine is only a few months old, and has only had ArcGIS v10.1 and Python2.7 installed on it (no other older versions). My other machine (that is several years old and had several versions of ArcGIS /Python on it) has tons of refernces to Python in the system envr variables. Hmmm...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 16:02:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456856#M35904</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-03-06T16:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456857#M35905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm still having no luck with this situation. I would appreciate someone from ESRI provide some more input. I'm asking about the "console python", meaning the python window that is launched from *within* Arcmap. I have no problems when running stand-alone scripts outside of Arcmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am also having problems with Addins, and I fear that this problem is causing those to fail as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please tell me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) What python.exe runs in the console window?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) What system environment variables are required by the console python?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) what system environment variables are checked by the console python?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) Is it possible to make ESRI Addins use the system python and not the console python?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;john&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 10:26:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456857#M35905</guid>
      <dc:creator>JohnBurkhart1</dc:creator>
      <dc:date>2013-03-11T10:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456858#M35906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would be extremely grateful for some input from ESRI to know whether my solution is 'normal'. But in the end, this seems to be what was required to get things working:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to get ESRI to run, and to use 64 bit processing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Download and run the 64bit background geoprocessing tools:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Luckily I found it once! I can't seem to find the link again...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Add the following to the system PYTHONPATH:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;;C:\Python27\ArcGISx6410.1\DLLs;C:\Python27\ArcGISx6410.1\lib;C:\Python27\ArcGISx6410.1\lib\plat-win;C:\Python27\ArcGISx6410.1\lib\lib-tk;C:\Python27\ArcGISx6410.1;C:\Program Files (x86)\ArcGIS\Desktop10.1\bin64;C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy;C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Scripts&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Create a system environment variable PYTHONSTARTUP and point to a python script for Arcmap Python so it doesn't get confused with 64 bit imports from the PYTHONPATH:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# My startup file&amp;nbsp; 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']: &amp;nbsp;&amp;nbsp;&amp;nbsp; print('Resetting Path') &amp;nbsp;&amp;nbsp;&amp;nbsp; sys.path = [ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #python32 for ESRI &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\windows\\system32\\python27.zip', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Python27\\ArcGIS10.1\\DLLs', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Python27\\ArcGIS10.1\\lib', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Python27\\ArcGIS10.1\\lib\\plat-win', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Python27\\ArcGIS10.1\\lib\\lib-tk', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Python27\\ArcGIS10.1', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Python27\\ArcGIS10.1\\lib\\site-packages', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\arcpy', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\ArcToolbox\\Scripts', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #defaults &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Python27\\Lib\\', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\Python27\\Lib\\site-packages', &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C:\\pythonnet' &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy import env &amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; import time&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; env.overwriteOutput = True&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is really the 'proper' way of doing things, some documentation would be nice... the help docs seem to not have very much information on any of this! I found better documentation online for open source geoprocessing tools.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 13:08:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456858#M35906</guid>
      <dc:creator>JohnBurkhart1</dc:creator>
      <dc:date>2013-03-11T13:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456859#M35907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi John,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have the &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/downloads/patches-servicepacks/view/productid/160/metaid/1913"&gt;64-bit background processing patch &lt;/A&gt;&lt;SPAN&gt;installed? If not, you may want to install it, you can read more about running scripts using 64 bit-processing &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002100000040000000"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Melanie S.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 14:17:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456859#M35907</guid>
      <dc:creator>MelanieSummers</dc:creator>
      <dc:date>2013-03-11T14:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456860#M35908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want to say the steps you've taken are not normal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For me to document a "fix" (like in your case), I'd need to be able to reproduce the problem so I can fully understand it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I still haven't found a way to "break" the Python window by having 64-bit Background and changing a combination of environment variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm glad you figured it out. Your well documented answer is good in case someone else encounters this situation. I'll spend a little bit more time trying to reproduce, but like I said, so far I've been unsuccessful - it all just works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 15:10:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456860#M35908</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-03-11T15:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456861#M35909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Were you able to figure out which specific PATH value was required to get you up and running? Surely not all of those...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 17:24:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456861#M35909</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-03-11T17:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456862#M35910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Were you able to figure out which specific PATH value was required to get you up and running? Surely not all of those...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Not entirely sure, but from my tests (limited) it seems this is what was required:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\arcpy',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to get 'arcpy' to import&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to get pythonaddins to import&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\ArcToolbox\\Scripts'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to get some toolboxes / my custom Addin working&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I did was to remove all custom system env variables and start:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\\Python27\ArcGIS10.1\python.exe&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I just did:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;%import sys&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;%paths_to_set = sys.path&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the paths_to_set list of strings, I made the startup script. I believe the most important point is to override the path settings that point to anything ArcGISx6410.1/...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--john&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 07:00:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456862#M35910</guid>
      <dc:creator>JohnBurkhart1</dc:creator>
      <dc:date>2013-03-12T07:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456863#M35911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I want to say the steps you've taken are not normal.&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;... it all just works.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If 'normal' means a 'vanilla' machine with no other Python installed, then no, my machine is not normal. I am highly experienced with Python programming, and my machine has multiple python installations and virtualenvs. I'm new to working with Arcpy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While I'm extremely happy to see the adaptation of Python into ESRI's tools,from what I see the overall 'paradigm' of arcpy is not all that 'pythonic'. It's a great tool for scripting, but it feels more like a set of wrappers than an API. But I'm getting used to it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I think it's naive to think that those working with arcpy won't have other installations and PATH modifications already done on their machines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To reproduce my setup... you could try to install 64bit python first, along with Ipython, numpy, scipy, and matplotlib... then make a custom PYTHONPATH setting to point to your own python script directory... maybe django also &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure you also point the PATH env variable to the django bin dir, and python scripts dir... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THEN, and only after the above... install Arcmap, then the 64 bit geoprocessing extension... maybe you'll be in the mess I am, and you'll find it doesn't "just work".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--john&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 07:17:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456863#M35911</guid>
      <dc:creator>JohnBurkhart1</dc:creator>
      <dc:date>2013-03-12T07:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456864#M35912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Interesting:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;1) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\arcpy',&lt;BR /&gt;to get 'arcpy' to import&lt;BR /&gt;&lt;BR /&gt;2) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin',&lt;BR /&gt;to get pythonaddins to import&lt;BR /&gt;&lt;BR /&gt;3) 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\ArcToolbox\\Scripts'&lt;BR /&gt;to get some toolboxes / my custom Addin working&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have a file "desktop10.1.pth" @ C:\Python27\ArcGIS10.1\Lib\site-packages ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This Python path file which gets put down by Desktop has those 3 references. Since you've manually created those, it sounds like you might not have it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The same exists @ C:\Python27\ArcGISx6410.1\Lib\site-packages for 64bit background, with a file called "DTBGGP64.pth"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 14:26:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456864#M35912</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-03-12T14:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456865#M35913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Strange, as I do have those .pth files. Interestingly, I just googled around a bit to remind myself whether .pth or PYTHONPATH takes precedence. The funny thing is, I found the answer here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/23230-quot-ImportError-No-module-named-arcpy-quot-PYTHON"&gt;http://forums.arcgis.com/threads/23230-quot-ImportError-No-module-named-arcpy-quot-PYTHON&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Somehow I didn't find this thread when I searched earlier... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Funny, because it provides a lot of answers to my problems... principally, that my PYTHONPATH setting was/is indeed messing up the 32 bit console python. So, if I want to keep my PYTHONPATH with the ArcGIS64 references, then my 'hack' is a valid solution... so it seems.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 18:31:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456865#M35913</guid>
      <dc:creator>JohnBurkhart1</dc:creator>
      <dc:date>2013-03-12T18:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456866#M35914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I seem to be having an issue similar to John, but everything on my machine is standard ESRI other than the installation of PythonWin. I have not odded anything to the PATH environment variable, or created PYTHONPATH or PYTHONSTARTUP environment variables. Registry keys for both the 32-bit and 64-bit versions of Python 2.7 look correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to publish a geoprocessing task to Server 10.1. I have installed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- ArcMap 10.2 SP 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- ArcGIS Server 10.1 SP1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- 64-bit background geoprocessing patch&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've enabled background geoprocessing. Since I assume 64-bit Python will be executed, I installed the latest 64-bit build of PythonWin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm starting my script by right-clicking on it in the ArcToolbox and selecting 'Debug...'. PythonWin prints the following first line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PythonWin 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first few lines of the script are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print sys.path&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The value that is being printed for sys.path is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; ['C:\\ARCGIS~1\\GEOPRO~1\\TGT_GP~1\\Scripts', 'C:\\ARCGIS~1\\GEOPRO~1\\TGT_GP~1\\Scripts', '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', 'C:\\arcgisserver\\geoprocessing\\TGT_GPExporter\\ExportGeoPDF.tbx', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\ARCGIS~1.1\\DLLs', 'C:\\Python27\\ARCGIS~1.1\\lib', 'C:\\Python27\\ARCGIS~1.1\\lib\\plat-win', 'C:\\Python27\\ARCGIS~1.1\\lib\\lib-tk', 'C:\\Python27\\ARCGIS~1.1\\Lib\\SITE-P~1\\PYTHON~1', 'C:\\Python27\\ARCGIS~1.1', 'C:\\Python27\\ARCGIS~1.1\\lib\\site-packages', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.1\\bin64', 'C:\\Python27\\ARCGIS~1.1\\lib\\site-packages\\win32', 'C:\\Python27\\ARCGIS~1.1\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\ARCGIS~1.1\\lib\\site-packages\\Pythonwin', 'C:\\Program Files\\ArcGIS\\Server\\bin', 'C:\\Program Files\\ArcGIS\\Server\\arcpy', 'C:\\Program Files\\ArcGIS\\Server\\ArcToolbox\\Scripts']&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script fails when it attempts to import arcgisscripting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't understand where all the references to 'c:\\program files (x86)\\arcgis\\desktop10.1\\bin', etc., are coming from.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 20:33:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456866#M35914</guid>
      <dc:creator>AlanStewart</dc:creator>
      <dc:date>2013-05-07T20:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456867#M35915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I fixed my immediate issue by installing the 32-bit version of PythonWin and setting the GeoProcessing Options to use that version.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 12:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456867#M35915</guid>
      <dc:creator>AlanStewart</dc:creator>
      <dc:date>2013-05-08T12:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456868#M35916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been trying to run this script which was converted from old VBA...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attempted in PythonWin&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PythonWin 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i add import arcpy to the beginning I get the following traceback:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; File "C:\Python27\Lib\SITE-P~1\PYTHON~1\pywin\framework\scriptutils.py", line 325, in RunScript&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; exec codeObject in __main__.__dict__&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; File "C:\Python27\HCA_TO~1\polytorec_231may13.py", line 4, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcPy\arcpy\__init__.py", line 17, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; from geoprocessing import gp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; from _base import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcPy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ImportError: DLL load failed: %1 is not a valid Win32 application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The process this code contains is a tool we really need and I have been "Beating" my head against the python wall trying to get this to run...so any help is much appreaciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 19:58:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456868#M35916</guid>
      <dc:creator>DanielAmrine</dc:creator>
      <dc:date>2013-06-03T19:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456869#M35917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 21:13:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456869#M35917</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-06-03T21:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing arcpy in ArcMap console -- 64 bit DLL conflict</title>
      <link>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456870#M35918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; 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&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;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&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;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.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;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.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did what you said and it didn't run the script but gave me this traceback:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;#0000FF&amp;quot;;"&gt;File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript&lt;BR /&gt; exec codeObject in __main__.__dict__&lt;BR /&gt; File "C:\Users\damrine\Desktop\HCA_TOOLS\polytorec_231may13.py", line 4, in &amp;lt;module&amp;gt;&lt;BR /&gt; import arcpy&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;#00FFFF&amp;quot;;"&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\__init__.py", line 17, in &amp;lt;module&amp;gt;&lt;BR /&gt; from geoprocessing import gp&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt; from _base import *&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt; import arcgisscripting&lt;BR /&gt;ImportError: Module use of python26.dll conflicts with this version of Python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've looked for the python27.dll in the C:/python27 but i can't find it and I can't find it in C:/program filex86/arcgis/desktop10.0/etc... either. I would think taking out the python26.dll in ArcMAP and replacing it with the python27.dll would fix it. Buti CAN'T find it!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 12:19:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-importing-arcpy-in-arcmap-console-64-bit/m-p/456870#M35918</guid>
      <dc:creator>DanielAmrine</dc:creator>
      <dc:date>2013-06-04T12:19:48Z</dc:date>
    </item>
  </channel>
</rss>

