点安装分叉github-repo [英] Pip install forked github-repo

查看:78
本文介绍了点安装分叉github-repo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个项目上,需要与sklearn软件包略有不同的功能.我已经分叉了仓库,并推送了我的更改.我知道我可以通过pip从github安装:

I'm working on a project and need a little different functionality from the package sklearn. I've forked the repo and pushed my changes. I know that I can install from github via pip:

pip install git+git://github.com/wdonahoe/scikit-learn-fork.git@master

然后我可以使用setup.py安装该软件包:

and then I can install the package with setup.py:

python setup.py install

但是,我对执行此步骤后的操作感到困惑.运行setup.py会在.../dist-packages/中创建一些.egg-info文件夹和.egg-links文件,但是我不确定该如何处理.理想情况下,我想进入.../projects/my_project中的项目并说类似

However, I am confused about what to do after this step. Running setup.py creates some .egg-info folders and .egg-links files in .../dist-packages/, but I am unsure what to do with them. Ideally, I'd like to go into my project in .../projects/my_project and say something like

from sklearn-my-version import <stuff> 

或仅用

from sklearn import <stuff>

我也有些困惑,因为在此问题上有很多资源提到使用easy_install,我认为这是pip取代的.

I am also a little confused because a lot of resources on this issue mention using easy_install, which I thought pip replaced.

推荐答案

仅使用一次重试(-e标志,您可以通过将其安装为git repo来进行git pull更新)

try again using just (-e flag lets you git pull updates by installing it as a git repo)

pip install -e git+git://github.com/wdonahoe/scikit-learn-fork.git@master#egg=scikit-learn

更多关于鸡蛋的信息: http://mrtopf.de/blog/zh-CN/a- python-eggs小介绍/

more on eggs: http://mrtopf.de/blog/en/a-small-introduction-to-python-eggs/

这篇关于点安装分叉github-repo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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