If you receive the error shown below (or similar) when installing the arcgis
package with pip
, then you need to install the system component libkrb5-dev
:
- Run
sudo apt install libkrb5-dev
- Rerun
pip install arcgis
Collecting gssapi
Using cached gssapi-1.7.3.tar.gz (1.3 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
In distributed package, building from C files...
/bin/sh: 1: krb5-config: not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-vuoxyh7g/gssapi_2bf1b86e891d4a719a9517292f369a57/setup.py", line 128, in <module>
link_args = shlex.split(get_output(f"{kc} --libs gssapi"))
File "/tmp/pip-install-vuoxyh7g/gssapi_2bf1b86e891d4a719a9517292f369a57/setup.py", line 41, in get_output
res = subprocess.check_output(*args, shell=True, **kwargs)
File "/home/thozub/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/home/thozub/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'krb5-config --libs gssapi' returned non-zero exit status 127.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
If an error occurs when youinstall krb5-config
, you should do:
sudo apt-get update
sudo apt --fix-broken install
sudo apt install libkrb5-dev