【问题标题】:PyProj package installation PROJ_DIR variablePyProj 包安装 PROJ_DIR 变量
【发布时间】:2019-07-31 17:07:03
【问题描述】:

我正在尝试安装 pyproj,但收到 Proj executable not found. Please set PROJ_DIR variable 错误。

命令

$ pipenv install pyproj

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

输出

$ 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


    【解决方案1】:
    pip install pyproj==1.9.6
    

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

    【讨论】:

    • 谢谢@Cloudwolfe 的回答!我按照建议安装了 proj 版本,但仍然遇到相同的错误。请问,你运行的是什么版本的celery
    【解决方案2】:

    Installation instructions推荐安装预编译轮子或者使用conda包管理器。

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

    【讨论】:

    猜你喜欢
    • 2018-05-14
    • 2016-02-11
    • 1970-01-01
    • 2021-02-23
    • 2016-03-29
    • 2016-09-28
    • 1970-01-01
    • 2020-06-12
    • 2021-12-06
    相关资源
    最近更新 更多