python - pip 安装特定的 fork

标签 python pip git-fork

我正在尝试pip install 一个特定的repo 分支,它位于:https://github.com/grutz/flask-session/tree/ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

根据 this SO question ,我尝试了以下但没有运气:

# pip install <link>
pip install https://github.com/grutz/flask-session/tree/ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

# pip install git+<link>
pip install git+https://github.com/grutz/flask-session/tree/ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

# pip install git+https://github.com/user/repo@branch
pip install git+https://github.com/grutz/flask-session@ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

# pip install git+https://github.com/user/repo.git@branch
pip install git+https://github.com/grutz/flask-session.git@ed62129fa1d9af36e77e9ce1de571d2c873a6c4e

我在这里做错了什么?我可以发布我的堆栈跟踪,但我想我在这里遗漏了一些简单的东西,那只会增加困惑。

最佳答案

pip需要知道项目名称;使用 egg= URL 哈希参数命名它:

pip install git+https://github.com/grutz/flask-session.git@ed62129fa1d9af36e77e9ce1de571d2c873a6c4e#egg=flask-session

关于python - pip 安装特定的 fork ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45559916/

相关文章:

python - 如何更改字典的键?

python - 根据 python 中的条件绘制多色线,但最终得到零散的线

python - pip 忽略 setup.py 中的dependency_links

python - numpy - 对整个矩阵的运算

python - 在 Mac 上安装加密时的 pycrypto massup

python - 我如何将 pip 指向 VCForPython27 以防止 "Unable to find vcvarsall.bat"错误

version-control - 我如何通知所有分支我的代码发生了重大变化?

github - 我如何知道谁在 GitHub 上 fork 了我的存储库?

git - 克隆 Git 存储库,以便我可以将其更新为原始版本,但将我的更改分开

python - 使用类级别变量停止 while 循环