从github的特定分支安装pip软件包 [英] Install package with pip from specific branch of github

查看:644
本文介绍了从github的特定分支安装pip软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常奇怪的问题。
我尝试从我的github fork中安装一个软件包。



这就是我所做的:

  pip install git + https ... @ my_branch 



不用my_branch安装软件包,它会安装在我的本地机器上,当我尝试使用Windows远程机器和我的Ubuntu Vagrant盒子时,它不起作用。主分支。最初我以为它与一个过时的pip版本有关,但在升级到最新版本后,我仍然面临同样的问题。



任何想法是什么问题? p>

解决方案

也许像@字符这样的字符在其他环境中的命令中无法正确识别?尝试像这样引用引号:pip installgit + https ... @ my_branch


I have across a very weird issue. I try to pip install a package from my github fork. I have done this multiple times in the past and it works always.

This is what I do:

pip install git+https...@my_branch

While this works perfectly in my local machine, when I try to w Windows Remote machine and to my Ubuntu Vagrant box it doesnt work.

Instead of installing the package with my_branch, it installs the master branch. Initially I thought it was related with an outdated version of pip but after upgrading to the latest version, I keep facing the same issue.

Any ideas whats the problem?

解决方案

Maybe some characters like the @ character are not recognized properly in your command in other environments? Try putting quotes, like this: pip install "git+https...@my_branch"

这篇关于从github的特定分支安装pip软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆