[英]Pip install forked github-repo
I'm working on a project and need a little different functionality from the package sklearn. 我正在开发一个项目,需要从包sklearn中获得一些不同的功能。 I've forked the repo and pushed my changes.
我已经分配了回购并推动了我的改变。 I know that I can install from github via pip:
我知道我可以通过pip从github安装:
pip install git+git://github.com/wdonahoe/scikit-learn-fork.git@master
and then I can install the package with setup.py: 然后我可以用setup.py安装包:
python setup.py install
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.
运行setup.py会在... / dist-packages /中创建一些.egg-info文件夹和.egg-links文件,但我不确定如何处理它们。 Ideally, I'd like to go into my project in .../projects/my_project and say something like
理想情况下,我想在... / projects / my_project中进入我的项目并说出类似的内容
from sklearn-my-version import <stuff>
or switch it out with just 或者用它来切换它
from sklearn import <stuff>
I am also a little confused because a lot of resources on this issue mention using easy_install, which I thought pip replaced. 我也有点困惑,因为在这个问题上有很多资源提到使用easy_install,我认为pip被替换了。
try again using just (-e flag lets you git pull updates by installing it as a git repo) 再次尝试使用(-e标志让你通过安装它作为git repo git拉取更新)
pip install -e git+git://github.com/wdonahoe/scikit-learn-fork.git@master#egg=scikit-learn
more on eggs: http://mrtopf.de/blog/en/a-small-introduction-to-python-eggs/ 关于鸡蛋的更多内容: http : //mrtopf.de/blog/en/a-small-introduction-to-python-eggs/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.