【问题标题】:how to install djangorestframework-gis-distance如何安装 djangorestframework-gis-distance
【发布时间】:2023-03-12 20:57:01
【问题描述】:

嗨,我在 ubuntu 上,我尝试安装 djangorestframework-gis-distance

我按照说明安装了安装良好的依赖项。 但是当我安装 djangorestframework-gis-distance 时,它​​给出了一个错误

    ERROR: Command errored out with exit status 1:
     command: /home/aarush/git_fudo/food1_back/food1_back/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ntgn7sle/djangorestframework-gis-distance/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ntgn7sle/djangorestframework-gis-distance/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-install-ntgn7sle/djangorestframework-gis-distance/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ntgn7sle/djangorestframework-gis-distance/setup.py", line 9, in <module>
        from pip.req import parse_requirements
    ModuleNotFoundError: No module named 'pip.req'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

这基本上说我认为没有名为 pip.req 的文件。 还有其他方法可以安装 djangorestframework-gis-distance 吗?

【问题讨论】:

    标签: python django django-rest-framework pip gis


    【解决方案1】:

    让我们看看:https://pypi.org/project/djangorestframework-gis-distance/。最新版本1.0.0 于 2016 年 2 月 7 日发布。

    需要 Python 2.7 但不是 3+。 Django 1.7+ 但很可能不是 Django 2+。错误消息表明 setup.py 使用了禁止的 API pip.req,该 API 仅在 pip

    底线:包被废弃和过时。算了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-12
      • 2021-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-12
      相关资源
      最近更新 更多