Use arcpy 3.x without being logged in to Pro

492
7
02-02-2021 06:58 AM
TL2
by
Occasional Contributor III

I would like to run arcpy 3.x scripts without being logged into Pro.  Right now I can't even check to see if I am logged in or even log in because the scripts fail because I am not logged in.

Can you make a 3.x copy independent of Pro?

Tags (3)
0 Kudos
7 Replies
JeffK
by
Occasional Contributor III

It depends on what kind of license (Named user, Floating, etc) that you have.  I think the named user licenses will let you use it with not having to 'sign in'.  All the others will require signing in at some point to use it.

0 Kudos
ReeseFacendini
Esri Contributor

You will have to do one of the following

  • Use a single-use license with your ArcGIS Pro install
  • Borrow / use the named user license offline

To use a license offline, open ArcGIS Pro, click on the settings button in the bottom left corner, click on the licensing tab on the left hand side, and check the box that says "take this license offline".  If the named user license comes from an ArcGIS License Manager, there is a limited number of days (usually 30) the license can be checked out.  If it's coming from ArcGIS Online, you can check it out for a longer period of time.

0 Kudos
TL2
by
Occasional Contributor III

My issue is the users get logged out periodically for no reason (I have a ticket open) and we have no way to be alerted.

0 Kudos
DanPatterson
MVP Notable Contributor

That isn't a python problem, you would still have to login to use anything associated with esri, which would include, arcpy and the arcgis modules... although the latter will allow you to perform non-esri tasks using pandas and shapely.

 


... sort of retired...
0 Kudos
DanPatterson
MVP Notable Contributor

I use python all the time without being logged in.

The only problem you will have is if you try to use arcpy or any geoprocessing tools.


... sort of retired...
HenryLindemann
Esri Contributor

Hi @TL2 

So in ArcGIS Pro when you open pro do you log in if yes there is a tick box remember me if you tick that then Pro does not log out of the scripts and I think it will also depend if you are using a floating license or a ArcGIS online named user.

If you are not using arcpy like @DanPatterson mentioned then you can just download Anaconda or Python and install the ArcGIS package.

Regards

Henry

0 Kudos
feralcatcolonist
New Contributor II

I think that ArcPy runs independently on the ArcGIS Notebook Server, but I'm not 100% sure on that.

What I do is two-fold

  1. I wrote a function that logs into ArcGIS Pro daily, this keeps the cookie from expiring that normally happens after 14 days of not logging into the GUI which will force you to re-enter your credentials. It also saves you from taking a license off-line forever just to run scripts. You can see the gist here.
  2. The other thing is to write in a check within your script to alert you if there is an import error for ArcPy, if it fails send an email. Not the most elegant, but generally works.
Reports that say that something hasn't happened are always interesting to me, because as we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns—the ones we don't know we don't know. And if one looks throughout the history of our country and other free countries, it is the latter category that tends to be the difficult ones. -----Excuse me, but is this an unknown unknown?-----
0 Kudos