Select to view content in your preferred language

bug pip pipenv install arcgis

6692
6
Jump to solution
04-30-2023 03:24 PM
degarzonm
New Contributor

Hello i just found a bug at the moment of installing arcgis with pip or pipenv, no matter if i try with or without dependencies the error is the same


error in arcgis setup command: 'install_requires' must be a string or list of strings containing valid project/version
requirement specifiers; [32m[1mExpected[0m end or semicolon (after version specifier)
keyring >=19,<=21.8.*

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.
[0m
This is likely caused by a bug in [32marcgis[0m. Report this to its maintainers.

1 Solution

Accepted Solutions
GilMastrapa
Occasional Contributor

Yes, locally is allowing to install up to 1.9.1, but for cloud functions to work it has to be 1.8.* . Here is a topic with more info on one of the broken dependencies (urllib)

https://community.esri.com/t5/arcgis-api-for-python-questions/error-init-got-an-unexpected-keyword-a... 

View solution in original post

6 Replies
LinasSpraunius
Emerging Contributor

I've got the same error. Any ideas on how to solve it?

0 Kudos
GISAdministrator_LMCC
Emerging Contributor

+ 1: Would love to know of a fix also

0 Kudos
GilMastrapa
Occasional Contributor

Any luck??? Incredible that we can't deploy our function because of this error on the cloud(it was working properly previously!). Cloud function uses pip, not conda.   


Collecting arcgis==2.0.1 (from -r requirements.txt (line 4))
Using cached arcgis-2.0.1.tar.gz (13.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
error in arcgis setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier)
keyring >=23.3.*
~~~~~~^
[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.

 

0 Kudos
GilMastrapa
Occasional Contributor

Update.

Downgrading arcgis to 1.9.1 solved the issues (using python 3.8), but at the cost of having to use a dated version of the API. 

Several inconsistencies with the 2.* version dependencies. 

Did you find any other solution? @degarzonm  @GISAdministrator_LMCC  @LinasSpraunius 

 

btripp
by
New Contributor

I am also running into the same problem. I tried multiple versions of arcgis, as well as different versions of python - but had no luck until I used python==3.8.10, and arcgis==1.8.5.post3. Not a solution, but an intermediate fix until the arcgis folks fix the issue.

For any windows users, here is a .bat script you can run to set up a python venv with arcgis==1.8.5.post3 (assuming you have python==3.8.x installed and are on a windows machine):

@echo off
setlocal

REM Set the paths
set PYTHON_DIR=C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python38
set VENV_NAME=py38

REM Create a new virtual environment
%PYTHON_DIR%\python.exe -m venv %VENV_NAME%

REM Activate the virtual environment
call %VENV_NAME%\Scripts\activate.bat

REM Install the packages
pip install --upgrade pip setuptools wheel
pip install "keyring>=19,<=21.8.*"
pip install --use-pep517 arcgis==1.8.5.post3

endlocal

 

 

GilMastrapa
Occasional Contributor

Yes, locally is allowing to install up to 1.9.1, but for cloud functions to work it has to be 1.8.* . Here is a topic with more info on one of the broken dependencies (urllib)

https://community.esri.com/t5/arcgis-api-for-python-questions/error-init-got-an-unexpected-keyword-a...