Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pip install forked github-repo

Tags:

python

pip

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 

and then I can install the package with 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. Ideally, I'd like to go into my project in .../projects/my_project and say something like

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.

like image 491
wdonahoe Avatar asked May 17 '15 20:05

wdonahoe


People also ask

How do I install forked repository?

Using A Forked NPM Dependency Creating a forked repository is very easy within GitHub. All you have to do is navigate to the repo of the project that you want to fork and select the Fork button. After you click this button, GitHub will create a copy of this repo within your user namespace.

Can you pip install from GitHub?

It's quite common to want to pip install a version of a package that hasn't been released to PyPI, but is available on its Git repository host, such as GitHub. If the package is pure Python or has a relatively simple build process integrated with setup.py , it can be installed from source.

How do I open a forked repository in GitHub?

You can fork any repo by clicking the fork button in the upper right hand corner of a repo page. Click on the Fork button to fork any repo on github.com.


1 Answers

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 

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

like image 191
jnshbr Avatar answered Sep 26 '22 10:09

jnshbr