2

I have a python package I want to use, but it appears that the version installed through pip is seriously outdated, to the point where example code doesn't work. some research independently verified that in order to get the code to work properly, I need the latest version from git.

How do I install a python package from within a virtual environment directly from git without going through pip?

Alternatively, since I don't know too much about pip, if this should never be necessary, then how do I force pip to install the latest version on github?

2
  • 1
    Why not use pip? Commented Jun 6, 2017 at 17:59
  • @OliverCharlesworth, hence my last paragraph. I did not know if pip could do that, and I didn't immediately think that it could. Commented Jun 6, 2017 at 18:08

1 Answer 1

5

You'll want to reference this documentation.

Here's the basic format:

pip install -e vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir

In the case of git it'd be something like

pip install -e git+https://www.github.com/name_your_project/name_your_repo
Sign up to request clarification or add additional context in comments.

1 Comment

how do we freeze those into requirements.txt?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.