Esri / arcgis-python-api

Documentation and samples for ArcGIS API for Python
https://developers.arcgis.com/python/
Apache License 2.0
1.89k stars 1.1k forks source link

Documentation on minimum dependencies needs update, enhancement? #1149

Closed ssciolla closed 2 years ago

ssciolla commented 2 years ago

Describe the bug

I have a job that installs the Python API after specifying minimum dependencies, as described here: https://developers.arcgis.com/python/guide/install-and-set-up/#Install-with-minimum-dependencies I am attempting to update to the latest version (1.9.1) of the arcgis library. However, I am getting an error about a missing module "cachetools": "ModuleNotFoundError: No module named 'cachetools'"

I guess this is because a new dependency was added that now needs to be specified in my requirements file. Prior to my latest changes, I was installing these dependencies and was able to then install arcgis 1.9.0 and run it separately:

ntlm-auth==1.5.0
requests==2.26.0
requests-toolbelt==0.9.1
requests_ntlm==1.1.0
six==1.16.0
ujson==4.1.0

I can try installing the missing library of course, but it would be nice if these changes were announced or tracked somewhere. Could you provide an updated version of the requirements? Or provide this in the public-facing documentation? Supported versions or version ranges for each dependency would also be helpful. I was confused when composing this list initially, because some of the libraries listed in the docs were spelled differently ("_" instead of "-", or vice versa).

Thanks in advance!

To Reproduce

In a virtual environment, or using Docker and related artifacts, 1) Install the dependencies listed here. 2) Install arcgis 1.9.1 with the --no-deps flag. 3) Run a program using arcgis.

error:

   File "/kartograafr/arcgisUM.py", line 9, in <module>
     import arcgis, dateutil.tz
   File "/usr/local/lib/python3.8/site-packages/arcgis/__init__.py", line 4, in <module>
     from . import features, geoanalytics, geocoding, geometry
   File "/usr/local/lib/python3.8/site-packages/arcgis/features/__init__.py", line 26, in <module>
     from .feature import Feature, FeatureSet, FeatureCollection
   File "/usr/local/lib/python3.8/site-packages/arcgis/features/feature.py", line 25, in <module>
     from arcgis.gis import Layer
   File "/usr/local/lib/python3.8/site-packages/arcgis/gis/__init__.py", line 34, in <module>
     from cachetools import cached, TTLCache
 ModuleNotFoundError: No module named 'cachetools'

Expected behavior

I expect to be able to run the latest arcgis version with minimum dependencies by following the installation instructions in the documentation. Even better would be a sample requirements.txt file.

Platform (please complete the following information):

Additional context

We use Docker to manage our project dependencies. I created a branch with the update in question; you can see our Dockerfile here and requirements.txt here.

achapkowski commented 2 years ago

The doc will be updated for v2.0.1