<?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: 'Floating licenses' being taken by script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488608#M38178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, it appears to immediately after importing arcpy, on the very next row arcpy.ProductInfo() returns 'ArcEditor' (ArcInfo is still in use on another workstation at this point.) I guess its initializing a new instance of arc entirely and grabs the highest available license. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly it outputs 'ArcEditor' both times when running this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
arcpy.AddMessage(arcpy.ProductInfo())

import os
os.system('SETX ESRI_SOFTWARE_CLASS "Viewer"')

arcpy.AddMessage(arcpy.ProductInfo())&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:29:42 GMT</pubDate>
    <dc:creator>ClintDow</dc:creator>
    <dc:date>2021-12-11T21:29:42Z</dc:date>
    <item>
      <title>'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488604#M38174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit: I should mention this is being run as a standalone script, not from within Arc&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 17:22:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488604#M38174</guid>
      <dc:creator>ClintDow</dc:creator>
      <dc:date>2014-03-10T17:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488605#M38175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Clint,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think when you &lt;/SPAN&gt;&lt;SPAN style="font-style: italic; text-decoration: underline;"&gt;import arcpy&lt;/SPAN&gt;&lt;SPAN&gt; it will automatically checkout whichever copy of ArcGIS you are set up for (see Start &amp;gt; All Programs &amp;gt; ArcGIS &amp;gt; ArcGIS Administrator &amp;gt; Desktop). You'll have to use two liences at once (sa and some level of ArcGIS).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to start the script by forcing the software level to ArcView, I would try something like this (changes the local environmental variables):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os
os.system('SETX ESRI_SOFTWARE_CLASS "Viewer"')

import arcpy
#do stuff&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if that is what you're looking for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488605#M38175</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2021-12-11T21:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488606#M38176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello Clint,&lt;BR /&gt;&lt;BR /&gt;I think when you &lt;SPAN style="font-style: italic; text-decoration: underline;"&gt;import arcpy&lt;/SPAN&gt; it will automatically checkout whichever copy of ArcGIS you are set up for (see Start &amp;gt; All Programs &amp;gt; ArcGIS &amp;gt; ArcGIS Administrator &amp;gt; Desktop). You'll have to use two liences at once (sa and some level of ArcGIS).&lt;BR /&gt;&lt;BR /&gt;If you want to start the script by forcing the software level to ArcView, I would try something like this (changes the local environmental variables):&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os
os.system('SETX ESRI_SOFTWARE_CLASS "Viewer"')

import arcpy
#do stuff&lt;/PRE&gt;&lt;BR /&gt;Let me know if that is what you're looking for.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello thank you for the reply,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have triple-checked that my licensing level in ArcGIS Administrator is at Basic, disabled Spatial Analyst in the Extentions dialogue in both ArcMap and ArcCatalog and checked in the 'Where have all the Licenses gone' application to ensure the licenses were not in use before running the script, but the issue is still persisting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I tried setting ESRI_SOFTWARE_CLASS as shown in your example, I get a confirmation message above my script output but unfortunately the licenses still get used up. Also I tried running that command in a cmd prompt then running my script from the prompt, but still get the same result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To make it even weirder, I signed out the ArcInfo license on another workstation, ran my script on my workstation, and it automatically took out an ArcEditor license instead. None of the geoprocessing tools require an ArcEditor license level, so I don't know why it would take that license in the first place.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit: I created a toolbox and edited the script to run from ArcCatalog rather than standalone, and the licenses are behaving as expected, so it seems to only happen when the script is run outside of arc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:29:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488606#M38176</guid>
      <dc:creator>ClintDow</dc:creator>
      <dc:date>2021-12-11T21:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488607#M38177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's strange, I wouldn't have guess that. There must be a weird initialization process for starting arcpy where is grabs the highest licence if it can. I'm guessing you have the administrative right to change your licence level using ArcGIS Administrator. Does it grab the highest licence as soon as it executes &lt;/SPAN&gt;&lt;SPAN style="font-style: italic; text-decoration: underline;"&gt;import arcpy&lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 20:08:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488607#M38177</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2014-03-10T20:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488608#M38178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, it appears to immediately after importing arcpy, on the very next row arcpy.ProductInfo() returns 'ArcEditor' (ArcInfo is still in use on another workstation at this point.) I guess its initializing a new instance of arc entirely and grabs the highest available license. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly it outputs 'ArcEditor' both times when running this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
arcpy.AddMessage(arcpy.ProductInfo())

import os
os.system('SETX ESRI_SOFTWARE_CLASS "Viewer"')

arcpy.AddMessage(arcpy.ProductInfo())&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:29:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488608#M38178</guid>
      <dc:creator>ClintDow</dc:creator>
      <dc:date>2021-12-11T21:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488609#M38179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try importing arcview before arcpy:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;import arcview, arcpy&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 09:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488609#M38179</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2014-03-11T09:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488610#M38180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clint, the os.system call will set the environment variable but env variable settings only affect new Desktop apps when they start up.&amp;nbsp; It will have no effect on the current environment within your script, or any standalone Python scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, arcpy.SetProduct() has no effect - it's been left there so old scripts won't be broken but it doesn't do anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luke is right - the way to get this to work correctly is to import arcview ("ArcGIS Basic") before arcpy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14117940945457377 jive_text_macro" jivemacro_uid="_14117940945457377"&gt;
&lt;P&gt;import arcview&lt;/P&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;sa_status = arcpy.CheckOutExtension("spatial")&lt;/P&gt;
&lt;P&gt;arcpy.AddMessage("ArcGIS product: " + arcpy.ProductInfo())&lt;/P&gt;
&lt;P&gt;arcpy.AddMessage("Spatial Analyst: " + sa_status) # "CheckedOut"&lt;/P&gt;




&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//002z0000000z000000"&gt;Help 10.2: Accessing license and extensions in Python&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Sep 2014 05:02:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488610#M38180</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-09-27T05:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488611#M38181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realize this is quite and old question, but rather than create a new post for the very same question:&amp;nbsp; @ Clint Dow, did Curtis or Luke's suggestions work for you?&amp;nbsp; I have the same issue.&amp;nbsp; When running my python scripts where I import the arcpy module, I'd rather use the arcview license than the arcinfo license in order to keep the advanced license free for our GIS developer.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 14:15:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488611#M38181</guid>
      <dc:creator>JoshuaBrengel</dc:creator>
      <dc:date>2018-07-20T14:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488612#M38182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this thread to see if it has any connection to this issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/message/698500-re-import-arceditor-does-not-set-proper-license-level?commentID=698500#comment-698500" title="https://community.esri.com/message/698500-re-import-arceditor-does-not-set-proper-license-level?commentID=698500#comment-698500"&gt;https://community.esri.com/message/698500-re-import-arceditor-does-not-set-proper-license-level?commentID=698500#comment…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 14:28:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488612#M38182</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2018-07-20T14:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488613#M38183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply Michael.&amp;nbsp; I'm running ArcMap 10.4 Python 2.7 in IDLE.&amp;nbsp; Based on my interpretation of the post you linked in your response above, it seems like there is conflicting information on if you can import arcview and not pull down the highest license level- in my case an arcinfo license.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xander seemed to claim he did not successfully import arcview but Ronald said it was possible to import arcview without pulling the highest level (to which Xander replied seeming to agree that conclusion).&amp;nbsp; All that aside, I'm guessing&amp;nbsp;I won't have an issue in 10.4 as long as I import arcview before I import arcpy?&amp;nbsp; Also, it will only pull one basic licenses, not two basic licenses, if I run a script and then open up an instance of ArcMap, correct?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 15:16:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488613#M38183</guid>
      <dc:creator>JoshuaBrengel</dc:creator>
      <dc:date>2018-07-20T15:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488614#M38184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 15:21:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488614#M38184</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2018-07-20T15:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488615#M38185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use of licenses when python scripting.&amp;nbsp; I only want to use arcview license unless tools in my script absolutely require use of arcinfo license&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 15:28:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488615#M38185</guid>
      <dc:creator>JoshuaBrengel</dc:creator>
      <dc:date>2018-07-20T15:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488616#M38186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 15:34:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488616#M38186</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2018-07-20T15:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: 'Floating licenses' being taken by script</title>
      <link>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488617#M38187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help Michael!&amp;nbsp; That's what I was hoping.&amp;nbsp; I modified my scripts to import arcview prior to import arcpy.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 17:09:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/floating-licenses-being-taken-by-script/m-p/488617#M38187</guid>
      <dc:creator>JoshuaBrengel</dc:creator>
      <dc:date>2018-07-20T17:09:25Z</dc:date>
    </item>
  </channel>
</rss>

