Tuesday, May 21, 2019

When the default pip install won't work. Using pip directly with a github repo

I work at a company where we cannot publish some (or all) Python modules to pyPI.

95% of the time before last week I would use:

pip/pip3 install [module name]

to install modules that I needed.

If that doesn't work and you have access to the git repo, another command that might be successful is installing directly from the repo. Here's an example:

pip3 install git+https://github.com/[username]/repo

And if you've downloaded the repo using git clone and there's a setup.py, which should be standard for a properly maintained module - you can run:

pip3 install -e .

Remember, sometimes you need to work around less-standard, less user-friendly modules so thankfully there are other pip options that can hopefully serve your needs.

No comments:

Exploring ELK (Elastic) Stack for hack-a-thon

At my current gig, our group finally got to do hack-a-thon week and I joined a team project that tied together a few of the technologies I&#...