Hello. I am attempting to install the "arcgis" package via the PyCharm package manager. The package fails to install with this error:
C:\Users\mshanaghan.URI\PycharmProjects\PythonProject\.venv\Scripts\python.exe C:/Program Files/JetBrains/PyCharm 2025.2.1.1/plugins/python-ce/helpers/packaging_tool.py install arcgis
Collecting arcgis
Using cached arcgis-2.0.0.tar.gz (3.7 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[16 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
exec(compile('''
~~~~^^^^^^^^^^^^
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<32 lines>...
exec(compile(setup_py_code, filename, "exec"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
''' % ('C:\\Users\\mshanaghan.URI\\AppData\\Local\\Temp\\pip-install-_h_jjf2z\\arcgis_4e3b3fcda0fb47ee99a955ab8f033458\\setup.py',), "<pip-setuptools-caller>", "exec"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<pip-setuptools-caller>", line 35, in <module>
File "C:\Users\mshanaghan.URI\AppData\Local\Temp\pip-install-_h_jjf2z\arcgis_4e3b3fcda0fb47ee99a955ab8f033458\setup.py", line 193, in <module>
_get_rel_site_packages_dir() + "arcgis/gis/_impl"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Process finished with exit code 1
I am using a virtual environment python interpreter. Any suggestions are appreciated. Thank you.
If you open the command prompt and activate that environment does pip install arcgis return the same error?
Thank you for the suggestion. I decided to just use an ArcGIS Online notebook, and everything installed smoothly there. In case anyone else has a use for this, this is how I integrated smartsheet data into AGOL.
# Connect to AGOL environment.
from arcgis.gis import GIS
gis = GIS("home")
# Install the smartsheet python sdk.
!pip install smartsheet-python-sdk
print("Installed successfully!")
# Import the pandas module.
import pandas as pd
print("Imported successfully!")
# Import the smartsheet module. Use the API key to give AGOL access to smartsheet data. Print a list of smartsheet sheets.
import smartsheet
smartsheet = smartsheet.Smartsheet('API Key goes here')
response = smartsheet.Sheets.list_sheets()
print(response)