PyProj包安装PROJ_DIR变量

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

我试图安装pyproj,虽然我得到一个Proj executable not found. Please set PROJ_DIR variable错误。

命令

$ pipenv install pyproj

我也尝试过pipenv git+https://github.com/jswhit/pyproj.git#egg=pyproj同样的结果。

OUTPUT

$ pipenv install pyproj Installation Succeeded Locking [dev-packages] dependencies Locking ['packages] dependancies Success! Installing dependencies from Pipfile.lock

错误

[pipenv.exceptions.InstallError]: ['Collecting pyproj==2.0.0 (from -r /var/folders/g3/912 vtylj2hb71xf_d_8sxz480000gn/T/pipenv-qeun2uwi-requirements/pipenv-behbdii2-requirement.tx t (line 1))', ' Using cached https://files.pythonhosted.org/packages/53/4b/21643a93e7d33 941498087290636e34c6d534aa8baa1ada54cf0d096ffaa/pyproj-2.0.0.tar.gz', ' Installing build dependencies: started', " Installing build dependencies: finished with status 'done'", ' Getting requirements to build wheel: started', " Getting requirements to build wheel: finished with status 'error'", ' Complete output from command /Users/darcyprice/.local/ share/virtualenvs/pure-dawn-52933-x98m1awW/bin/python3 /Users/darcyprice/.local/share/vir tualenvs/pure-dawn-52933-x98m1awW/lib/python3.6/site-packages/pip/_vendor/pep517/_in_proc ess.py get_requires_for_build_wheel /var/folders/g3/912vtylj2hb71xf_d_8sxz480000gn/T/tmpw q5vvpkd:', ' Proj executable not found. Please set PROJ_DIR variable.', ' ', ' ------- ---------------------------------'] [pipenv.exceptions.InstallError]: ['Command "/Users/darcyprice/.local/share/virtualenvs/p ure-dawn-52933-x98m1awW/bin/python3 /Users/darcyprice/.local/share/virtualenvs/pure-dawn- 52933-x98m1awW/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires _for_build_wheel /var/folders/g3/912vtylj2hb71xf_d_8sxz480000gn/T/tmpwq5vvpkd" failed wit h error code 1 in /private/var/folders/g3/912vtylj2hb71xf_d_8sxz480000gn/T/pip-install-t_ ap8o3w/pyproj']

python pip package proj pyproj
2个回答
1
投票

Installation instructions建议安装预编译的轮子或使用conda包管理器。

如果您仍想从源代码编译PyProj,您需要setup PROJ.4(请理解PyProj是Proj的Python包装器)。


4
投票
pip install pyproj==1.9.6

上面使用的相同问题。如果适合您的需要,请安装2019年3月8日之前的最新版本。

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