首页 > 解决方案 > Heroku pip install 无法安装 billy-api

问题描述

我试图通过 GitHub 在我的 heroku 服务器上安装更新版本的 bitly-api,因为我们遇到了从 2.7.15 到 3.6.6 的问题,所以我添加了 git+git:https://URLOFGIT.GIT和我似乎收到以下错误。这是什么意思?

我需要强制它使用 pip3 吗?

-----> Python app detected
-----> Found python-2.7.15, removing
-----> Installing python-3.6.6
-----> Installing pip
-----> Installing requirements with pip
       Collecting git+git:https://github.com/bitly/bitly-api-python.git (from -r /tmp/build_c254deea58fb0d0ccb947f1819f45b29/requirements.txt (line 25))
         Cloning git:///https://github.com/bitly/bitly-api-python.git to /tmp/pip-tibxul79-build
       fatal: unable to connect to :
       : Name or service not known

       Command "git clone -q git:///https://github.com/bitly/bitly-api-python.git /tmp/pip-tibxul79-build" failed with error code 128 in None
 !     Push rejected, failed to compile Python app.
 !     Push failed

标签: pythonpython-3.xgithubheroku

解决方案


下面是在 requirements.txt 中提供 GitHub URL 的正确方法
https://github.com/bitly/bitly-api-python/archive/v0.3.zip

参考:https ://stackoverflow.com/a/24811490/3007402 (见最后一行)


推荐阅读