<?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: Running Arcpy with a authorization code or virtual token in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154626#M52910</link>
    <description>&lt;P&gt;Forgot to mention, you might not want to run Python on a supercomputer as it will probably take you a bit to tweak it for optimal performance and as you are likely aware, supercomputer time is limited. I would opt to go the route of C++ if my memory is correct on what is the most common language for it to run on. Stanford has been using Regent too.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2022 05:51:18 GMT</pubDate>
    <dc:creator>John_Spence</dc:creator>
    <dc:date>2022-03-17T05:51:18Z</dc:date>
    <item>
      <title>Running Arcpy with a authorization code or virtual token</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154578#M52901</link>
      <description>&lt;P&gt;Hello, my name is Héctor, I'm seeking a college degree. I have an ArcGIS Pro license due to my university. And I need to run an image classification routine (Support Vector Machine classification) and it's going to take a few days to analyse a whole watershed. That is why I would like to run the python code of this process on the supercomputer at my university. But the supercomputer only runs Python codes and I cannot install&lt;SPAN&gt;&amp;nbsp;ArcGIS Pro. Thus, Arcpy does not work on this computer because of its&amp;nbsp;software dependency on ArcGIS Pro.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Just like Google Earth Engine where you can create a key to run any code without worrying about the virtual token (Authorization process). Is there a way to run Arcpy by not installing ArcGIS Pro?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I only want a way to leave my code running on a terminal, close my laptop and wait until the analyse is done.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please, I have been reading a lot of websites but I cannot figure out a way to deal with this. I only want to run Python code in a terminal without worrying about leaving my laptop on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please I need help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 23:19:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154578#M52901</guid>
      <dc:creator>HéctorLeopoldoVenegasQuiñones</dc:creator>
      <dc:date>2022-03-16T23:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Running Arcpy with a authorization code or virtual token</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154579#M52902</link>
      <description>&lt;P&gt;You can do it without ArcPy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def getToken():&lt;BR /&gt;#-------------------------------------------------------------------------------&lt;BR /&gt;# Name: Function - getToken&lt;BR /&gt;# Purpose: Get's a authentication token from Portal.&lt;BR /&gt;#-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;if portal_URL[-1] == '/':&lt;BR /&gt;url = portal_URL + 'sharing/rest/generateToken'&lt;BR /&gt;referrer = portal_URL[0: -1]&lt;BR /&gt;else:&lt;BR /&gt;url = portal_URL + '/sharing/rest/generateToken'&lt;BR /&gt;referrer = portal_URL&lt;/P&gt;&lt;P&gt;values = {'f': 'json',&lt;BR /&gt;'username': portal_uName,&lt;BR /&gt;'password': base64.b64decode(portal_pWord),&lt;BR /&gt;'referer' : referrer,&lt;BR /&gt;'expiration' : '60'}&lt;/P&gt;&lt;P&gt;data = urllib.parse.urlencode(values).encode("utf-8")&lt;BR /&gt;req = urllib.request.Request(url)&lt;/P&gt;&lt;P&gt;response = None&lt;BR /&gt;while response is None:&lt;BR /&gt;try:&lt;BR /&gt;response = urllib.request.urlopen(req,data=data)&lt;BR /&gt;except:&lt;BR /&gt;pass&lt;BR /&gt;the_page = response.read()&lt;/P&gt;&lt;P&gt;#Garbage Collection with some house building&lt;BR /&gt;payload_json = the_page.decode('utf8')&lt;BR /&gt;payload_json = json.loads(payload_json)&lt;/P&gt;&lt;P&gt;data_token = payload_json['token']&lt;/P&gt;&lt;P&gt;return (data_token)&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 23:30:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154579#M52902</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2022-03-16T23:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Running Arcpy with a authorization code or virtual token</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154583#M52904</link>
      <description>&lt;P&gt;Oh....you can drop the base64 stuff I have in there. Had a security by obscurity moment.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 23:36:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154583#M52904</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2022-03-16T23:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Running Arcpy with a authorization code or virtual token</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154596#M52906</link>
      <description>&lt;P&gt;arcpy is available to install from a &lt;A href="https://anaconda.org/esri/arcpy" target="_blank" rel="noopener"&gt;conda package&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 00:44:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154596#M52906</guid>
      <dc:creator>AnthonyRyanEQL</dc:creator>
      <dc:date>2022-03-17T00:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Running Arcpy with a authorization code or virtual token</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154626#M52910</link>
      <description>&lt;P&gt;Forgot to mention, you might not want to run Python on a supercomputer as it will probably take you a bit to tweak it for optimal performance and as you are likely aware, supercomputer time is limited. I would opt to go the route of C++ if my memory is correct on what is the most common language for it to run on. Stanford has been using Regent too.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 05:51:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/running-arcpy-with-a-authorization-code-or-virtual/m-p/1154626#M52910</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2022-03-17T05:51:18Z</dc:date>
    </item>
  </channel>
</rss>

