Select to view content in your preferred language

Change Python to run script as 32bit

39902
7
Jump to solution
02-02-2016 06:22 AM
TiffanySelvidge1
Frequent Contributor

I have seen this asked once before but not answered.

How can python script be directed to run as 32 bit rather than 64bit? I have some vb code in my script from multiple Calculate fields. Eventually I will convert it all but right now I really need to get my script running with Windows Task Scheduler.

I have Python 2.7.8; Windows 7; Arc 10.3.1.

I can open the python command window and run 32 bit so the server has 32 installed, I just can't get my script to automatically run as 32bit.

Tags (2)
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi Tiffany,

You can get a python script to run as 32-bit by following the below steps:

1.  Right-click on your script in Windows Explorer > Open With > Choose Default Program

2.  Browse to the python.exe file located under the 32-bit installation (i.e. C:\Python27\ArcGIS10.3\python.exe)

3.  Check the option 'Always use the selected program to open this kind of file'

View solution in original post

7 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Tiffany,

You can get a python script to run as 32-bit by following the below steps:

1.  Right-click on your script in Windows Explorer > Open With > Choose Default Program

2.  Browse to the python.exe file located under the 32-bit installation (i.e. C:\Python27\ArcGIS10.3\python.exe)

3.  Check the option 'Always use the selected program to open this kind of file'

TiffanySelvidge1
Frequent Contributor

I have now directed and redirected it multiple times but it still insists upon opening in the 64bit.

0 Kudos
TiffanySelvidge1
Frequent Contributor

Jake,

It now opens with 32bit. I changed the name of the 32 bit python to python32. Then I (again) redirected the file to open with 32bit.

Thanks for your help!

0 Kudos
Brownschuh
Frequent Contributor

...I changed the name of the 32 bit python to python32...

What exactly did you change the name of?  python.exe?  pythonw.exe?

Right now I am struggling with this issue on a server, both 32 and 64-bit versions of python are installed.  Even if I manually try to run a script using the 32-bit version, it always runs in 64 ... 

0 Kudos
TiffanySelvidge1
Frequent Contributor

Do you happen to know how to configure Python Idle to work with the 32bit? Once I changed the default program to 32bit my option to use Idle is no longer available. When I open Idle it shows itself as using 64bit.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

The 32-bit IDLE can be found here

C:\Python27\ArcGIS10.3\Lib\idlelib\idle.bat

You could create a shortcut of the above file on Desktop.

For details, refer the following blog

64-bit vs. 32-bit Python explained | Support Services Blog



Think Location
TiffanySelvidge1
Frequent Contributor

Cool. Thank you!

0 Kudos