通过pip或pipenv安装arcgis时出错

问题描述 投票:0回答:1

我正在尝试通过命令行安装 arcgis,使用以下命令:

  • py -m pipenv 安装 arcgis
  • py -m pip 安装 arcgis
  • conda安装-c esri arcgis

无论我采取哪种方法,它都会不断地给我这个错误:

正在安装... [= ] 正在安装 arcgis...[31m[1mError: [0m 安装时发生错误 [32marcgis[0m! 错误文本:正在收集 arcgis 下载 arcgis-2.0.0.tar.gz (3.7 MB) ---------------------------------------------------- 3.7/3.7 MB 2.1 MB/秒 eta 0 :00:00 准备元数据(setup.py):开始 准备元数据(setup.py):已完成,状态为“错误”

[36m 错误:子进程退出并出现错误

× python setup.py Egg_info 未成功运行。 │ 退出代码:1 ╰─>【7行输出】 回溯(最近一次调用最后一次): 文件“”,第 2 行,位于 文件“”,第 34 行,位于 文件“C:\ Users \ heath \ AppData \ Local \ Temp \ pip-install-udrotsx3 rcgis_ddd68d8abb1c44d1a097b8b962e45b1b \ setup.py”, 第 193 行,在 _get_rel_site_packages_dir() + “arcgis/gis/_impl” ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ 类型错误:+ 不支持的操作数类型:“NoneType”和“str”

注意:此错误源自子进程,并且可能不是 pip 的问题。 错误:元数据生成失败

× 生成包元数据时遇到错误。 ╰─> 请参阅上面的输出。

注意:这是上面提到的包的问题,而不是 pip 的问题。 提示:详细信息请参见上文。 [0米 这可能是由 [32marcgis[0m.将此报告给其维护者。

如前所述,我尝试通过 pip、pipenv 和 conda 安装,但没有成功。

arcgis
1个回答
0
投票

有点晚了,但我刚刚在虚拟环境中安装了 Python

v3.12
时遇到了这个错误,所以对于其他任何人,只需将 Python 版本降级到 Conda 环境中的
3.9
3.10
3.11
即可解决对我来说这个问题,似乎是最新的 Python 版本
arcgis-py
API 在 2023 年 10 月的最新版本中支持

原始问题中提到的同一问题也在他们的存储库中使用 Python v3.7.9

 提出。请注意,当尝试使用 Python 
arcgis
 通过 
conda install -c esri arcgis
 安装 
v3.12.2
 时,我收到了 
Could not solve for environment specs
 错误。当尝试使用
pip install
时,出现了发布的错误。

conda install python 3.11 -n name_of_your_env conda install -c esri arcgis -n name_of_your_env
降级后,使用

pip

conda
安装效果很好。

© www.soinside.com 2019 - 2024. All rights reserved.