<?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 Re: 10.1 SP1 64bit geoprocessing, error importing arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294769#M22808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're right, there's definitely something I'm not getting. In IDLE, I do get 'C:\\Python27\\ArcGISx6410.1\\pythonw.exe', and I'm not sure what that proves...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay, here's another version of test.py:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import subprocess, sys, os, arcpy
cmd = r'C:\Python27\ArcGISx6410.1\python.exe ' + sys.argv[0].replace('.py','_slave.py')
print "&amp;nbsp;&amp;nbsp;&amp;nbsp; - About to run: " + cmd
theprocess = subprocess.Popen(cmd, shell=False)
theprocess.communicate()
print "All done"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the same error with this. If I specify pythonw.exe on line 2, I get the same failure, but no indication of it because the output is being sent out to oblivion. Anyway, I would like not to have to hard-code the path to python.exe because the scripts I'm writing will be run by other folks on other machines.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 14:10:12 GMT</pubDate>
    <dc:creator>JeffKruys</dc:creator>
    <dc:date>2021-12-11T14:10:12Z</dc:date>
    <item>
      <title>10.1 SP1 64bit geoprocessing, error importing arcpy</title>
      <link>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294765#M22804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This error only occurs when using the 64bit python.exe that is installed with the SP1 for 64bit geoprocessing. And it only occurs when importing the arcpy module in a python script that is called from within another python script. I am using Windows 2008 Server R2 and ArcGIS Desktop 10.1 and the Python 2.7 that is installed with it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's script 1, named test.py:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy, os, sys print "Imported arcpy, os and sys modules successfully in main script" os.system(sys.argv[0].replace('.py','_slave.py'))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's script 2, named test_slave.py:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy print "Imported arcpy module successfully in slave script"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm initiating the test.py script by entering "X:\fullpath\test.py" at the Windows command prompt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the past, in 32bit before installing SP1, this runs with no problem. Now, after installing SP1 and switching the Windows association with the .py extension to the 64bit python.exe, this is what I get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Imported arcpy, os and sys modules successfully in main script Traceback (most recent call last): &amp;nbsp; File "X:\fullpath\test_slave.py", line 1, 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 21, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy.geoprocessing import gp &amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; from _base import * &amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\ArcPy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; import arcgisscripting ImportError: DLL load failed: %1 is not a valid Win32 application.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And in fact, when I switch the Windows association with the .py extension back to the 32bit python.exe, I continue to get this error, until I uninstall SP1 for 64bit geoprocessing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug, or is there some workaround I can employ to get this working under 64bit? (Please don't recommend that I rewrite all my scripts to not call scripts from within scripts!)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 21:02:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294765#M22804</guid>
      <dc:creator>JeffKruys</dc:creator>
      <dc:date>2013-02-08T21:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 SP1 64bit geoprocessing, error importing arcpy</title>
      <link>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294766#M22805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe your problem stems from your 'os.system' call which runs your 'test_slave.py' in a subshell using the standard C function, 'system()'.&amp;nbsp; See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/2/library/os.html#os.system"&gt;http://docs.python.org/2/library/os.html#os.system&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...where I quote:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"The subprocess module provides more powerful facilities for spawning new processes and retrieving their results; using that module is preferable to using this function."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A similar error is noted at this forum post, see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/66847-32-bit-and-64-bit-Python-2.7-on-the-same-machine"&gt;http://forums.arcgis.com/threads/66847-32-bit-and-64-bit-Python-2.7-on-the-same-machine&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you can see, although using slightly different techniques, you may call the error precisely identical in nature.&amp;nbsp; It is the same error tripped by running in a shell process, a 32-bit 'operating process space', for lack of a better term.&amp;nbsp; This was your critical clue, your error:&lt;/SPAN&gt;&lt;BR /&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;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to run this way, try the suggestion by Chris Snyder, using the subprocess module, see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/75207-Excel-and-Python-Friends-or-Foes?#20"&gt;http://forums.arcgis.com/threads/75207-Excel-and-Python-Friends-or-Foes?#20&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris lists the command there as in that noted in italics below.&amp;nbsp; If you will notice the use of the pythonExePath, that should be set as your Python executable path, which I believe you could set to the 64-bit version (the post at the link above concerned 32-bit but I think you should be able to to launch either 32-bit/64-bit python.exe).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;pythonExePath = r'C:\Python27\ArcGISx6410.1\pythonw.exe'&lt;BR /&gt;subprocess.Popen([pythonExePath, childScriptPath, str(inputVar1), str(inputVar2)], shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps to clarify.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ADDITIONAL NOTE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'pythonw.exe' or 'python.exe', what is the difference?&amp;nbsp; Use the one with 'w' appended to 'python' to not display the command window...i.e., 'python' + 'w' + '.exe', or 'pythonw.exe'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"This suppresses the terminal window on startup."&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/2/using/windows.html#executing-scripts"&gt;http://docs.python.org/2/using/windows.html#executing-scripts&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 23:10:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294766#M22805</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-02-12T23:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 SP1 64bit geoprocessing, error importing arcpy</title>
      <link>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294767#M22806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response. Here's my latest test using the subprocess module, which still fails if arcpy is imported in both the main script and in the subprocess script. Along the way, I discovered that "sys.executable" returns the full path of the python.exe currently being executed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;test.py:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import subprocess, sys, os, arcpy
cmd = sys.executable + " " + sys.argv[0].replace('.py','_slave.py')
print "&amp;nbsp;&amp;nbsp;&amp;nbsp; - About to run: " + cmd
theprocess = subprocess.Popen(cmd, shell=False)
theprocess.communicate()
print "&amp;nbsp;&amp;nbsp;&amp;nbsp; - All done"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;test_slave.py:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import sys, time
print "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Currently executing: " + sys.executable + " " + sys.argv[0]
print "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - sleeping for 5 sec"
time.sleep(5)
print "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - importing arcpy"
import arcpy
print "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - success; returning to main script"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Result:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - About to run: C:\Python27\ArcGISx6410.1\python.exe X:\fullpath\test_slave.py
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Currently executing: C:\Python27\ArcGISx6410.1\python.exe X:\fullpath\test_slave.py
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - sleeping for 5 sec
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - importing arcpy
Traceback (most recent call last):
&amp;nbsp; File "X:\fullpath\test_slave.py", line 6, 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 21, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy.geoprocessing import gp
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from _base import *
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.1\ArcPy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcgisscripting
ImportError: DLL load failed: %1 is not a valid Win32 application.
&amp;nbsp;&amp;nbsp;&amp;nbsp; - All done&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas? Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:10:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294767#M22806</guid>
      <dc:creator>JeffKruys</dc:creator>
      <dc:date>2021-12-11T14:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 SP1 64bit geoprocessing, error importing arcpy</title>
      <link>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294768#M22807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are making the same critical error....maybe you aren't understanding.&amp;nbsp; sys.executable isn't going to cut it...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this, maybe you will see -- open IDLE if you have it, and simply issue this command (after importing sys of course):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; sys.executable&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you get fed back to you?&amp;nbsp; I'll bet you did not get the correct path, which should have been this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'C:\Python27\ArcGISx6410.1\pythonw.exe'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did I guess correctly??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Wayne&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT:&amp;nbsp; I am adding to my post because I hope you do not uninstall anything - it is going to be just fine with 2 versions of the python.exe (32 bit/64 bit versions)......the part you are not quite grasping is that you can EXPLICITLY state the pythonExePath variable as in post #2.&amp;nbsp; That, I am confident, is your ticket.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(...and thanks goes again to Chris Snyder for his contributions [see the links provided] to help get the concept through my thick head!&amp;nbsp; Also Mr. Hibma at ESRI, etc., the list goes on...)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 15:38:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294768#M22807</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-02-14T15:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 SP1 64bit geoprocessing, error importing arcpy</title>
      <link>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294769#M22808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're right, there's definitely something I'm not getting. In IDLE, I do get 'C:\\Python27\\ArcGISx6410.1\\pythonw.exe', and I'm not sure what that proves...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay, here's another version of test.py:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import subprocess, sys, os, arcpy
cmd = r'C:\Python27\ArcGISx6410.1\python.exe ' + sys.argv[0].replace('.py','_slave.py')
print "&amp;nbsp;&amp;nbsp;&amp;nbsp; - About to run: " + cmd
theprocess = subprocess.Popen(cmd, shell=False)
theprocess.communicate()
print "All done"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the same error with this. If I specify pythonw.exe on line 2, I get the same failure, but no indication of it because the output is being sent out to oblivion. Anyway, I would like not to have to hard-code the path to python.exe because the scripts I'm writing will be run by other folks on other machines.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:10:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294769#M22808</guid>
      <dc:creator>JeffKruys</dc:creator>
      <dc:date>2021-12-11T14:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 SP1 64bit geoprocessing, error importing arcpy</title>
      <link>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294770#M22809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All fixed now. I was providing a single string (the command as I would enter it at the command line) as the first argument to subprocess.Popen, but it wants a list (as you had specified in your first response). This version of test.py works fine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import subprocess, sys, os, arcpy print "&amp;nbsp;&amp;nbsp;&amp;nbsp; - About to run: " + sys.executable + " " + sys.argv[0].replace('.py','_slave.py') theprocess = subprocess.Popen([sys.executable,sys.argv[0].replace('.py','_slave.py')], shell=False) theprocess.communicate() print "&amp;nbsp;&amp;nbsp;&amp;nbsp; - All done"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know why specifying a single command string instead of a list would work at all, invoking the slave script and only failing when trying to import arcpy a second time. But the above works, so I'm happy. Thanks a lot for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 17:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294770#M22809</guid>
      <dc:creator>JeffKruys</dc:creator>
      <dc:date>2013-02-14T17:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 SP1 64bit geoprocessing, error importing arcpy</title>
      <link>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294771#M22810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Beautiful, glad it is now running - I knew you'd get it eventually.&amp;nbsp; About the 'python' vs 'pythonw' convention - no msgs are being sent into 'oblivion' but by design, no messages are being sent, i.e. they are suppressed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you would please, go ahead and mark this post 'answered' using the controls to the right corner...there's a green checkmark.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That will definitely aid others just looking directly for the marked answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: Notice that the list fed into subprocess takes on the same command line you would [very likely] enter for scheduled tasks:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(the exe path), (the script file), (param1), (param2), param3), ...etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is a whole new process that you are making your 'master' script aware of, although after it is started, the 'subprocess' is more or less autonomous.&amp;nbsp; So you need the whole command string.&amp;nbsp; The other route you were heading down does not function the same way, but calls the subshell C by default and there is no opting out of that....&amp;nbsp; There's a lot more to explain about that, but I am not even going down that rabbit hole!&amp;nbsp; It is just important to know you have to be specific about which 'process space' you want to use, and using os.system calls the same C function system() does and runs in 32-bit space....so when you get '...not a valid Win32 application', it is speaking of your 64-bit exe.&amp;nbsp; The C process is 'unaware' of what your 64-bit py even is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope I described that properly enough.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 18:01:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-sp1-64bit-geoprocessing-error-importing-arcpy/m-p/294771#M22810</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-02-14T18:01:55Z</dc:date>
    </item>
  </channel>
</rss>

