Skip to content

Instantly share code, notes, and snippets.

@sloanlance
Last active August 19, 2016 14:20
Show Gist options
  • Save sloanlance/47fece4706c69fca0cba46abdc45a6f3 to your computer and use it in GitHub Desktop.
Save sloanlance/47fece4706c69fca0cba46abdc45a6f3 to your computer and use it in GitHub Desktop.
Python pip installs
  1. Install package from the source directory:
pip install -e .
  1. Install package from GitHub repo specific branch or tag, with installation config files in a different subdirectory (not the project root):
pip install 'git+_GitHub_repo_URL_@_branch_or_tag_name_#egg=_project_name_&subdirectory=_subdirectory_path_'

For example, Esri's ArcREST doesn't have its setup.py, requirements.txt, etc. in the root directory of its repository as pip expects. They are in the /src subdirectory. To install the version 3.5.3 release of that package, which has been tagged with its version number, use the command: code from https://github.com/sloanlance/ArcREST/tree/all-bugfixes/src:

pip install 'git+https://github.com/Esri/ArcREST.git@3.5.3#egg=arcrest&subdirectory=src'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment