PIP — Install Specific Commit from Git Repository

I’ve switched to an all PIP deployment setup. I used to keep some libraries in my code repository because I needed specific versions or hacked ones.

I’m now in a setup where I don’t have any hacked libraries, so all is good, except I need a dev version of django-mailer that’s not on PIP.

PIP can handle git repos, but what if an unstable change gets introduced?

Well, until now, I didn’t know you could specify a commit hash in your pip install command.

Specify the hash tag with @, and use git:// syntax, not the default https: that the clone bar shows you.

# requirements.txt

# shell
bash $ pip install -r requirements.txt


Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s