I've had no trouble with using similar licensing in Python scripts previously, so I'm wondering if a recent upgrade/replacement of my PyScripter environment may have caused it to stop working.

I'm using ArcGIS 10.7.1.

Running the following in ArcMap works:

>>> arcpy.CheckExtension("Spatial")

But running the following in PyScripter (3.6.1):

import arcpy
print arcpy.CheckExtension("Spatial")

it just prints:


How can I get this to work in the upgraded PyScripter like it used to in the old PyScripter environment?

NB: If I run it on a PC where PyScripter has NOT been upgraded/replaced, it does work, and prints:


1 Answer 1


By running print(sys.executable) I have found that it is using an old 64 bit installation of Python from an older version of ArcGIS. It turns out that there are several versions of Python installed from various versions of ArcGIS.

After deleting the other older installs of Python (which required restarting the machine first), and then re-running PyScripter, it tells me that it cannot find a Python engine.

The rest of the message explains that this is a 64 bit version of PyScripter and only works with 64 bit Python, and to use the 32 bit version of PyScripter for 32 bit versions of Python.

It seems that that old install was the only 64 bit Python I had on the machine. Removing PyScripter 64 and re-installing a 32 bit version of PyScripter has fixed it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.