'Floating licenses' being taken by script

8219
13
03-10-2014 10:22 AM
ClintDow
Occasional Contributor
Hello all,

I feel like I'm missing something simple, but I have a script that uses arcpy.CreateRandomPoints_management which requires either a spatial analyst license or ArcInfo license.

At work we have a floating ArcInfo license, so if the license is free the script automatically uses it, even though at no point in my script do I import ArcInfo. I do however check out spatial analyst, we have multiple licenses for sa, so I would rather use SA than holding up ArcInfo for the duration of the script (which in this case will be quite a long time)

The script is actually taking both licenses now that I check, so for this one script to run its taking both spatial analyst and ArcInfo. Is there some way to force it to ONLY use spatial analyst? I have tried explicit setting arcpy.SetProduct('ArcView') which does not seem to have any effect.

edit: I should mention this is being run as a standalone script, not from within Arc
Tags (2)
0 Kudos
13 Replies
MichaelVolz
Esteemed Contributor

Joshua:

Is your question in regards to the OP about using specific tools with a certain license and extension or just a general question about the use of licenses when using python scripting?

0 Kudos
JoshuaBrengel
New Contributor III

Use of licenses when python scripting.  I only want to use arcview license unless tools in my script absolutely require use of arcinfo license

0 Kudos
MichaelVolz
Esteemed Contributor

If you are running the script on your computer with a basic license and you open ArcMap with the same license level, then you would only be using 1 license just as if you had 2 ArcMap sessions open on your computer.

0 Kudos
JoshuaBrengel
New Contributor III

Thanks for your help Michael!  That's what I was hoping.  I modified my scripts to import arcview prior to import arcpy. 

0 Kudos