Skip to content

Instantly share code, notes, and snippets.

@rocarvaj
Last active November 22, 2017 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rocarvaj/5b38e7b3cf681ab8b6b95038839429e2 to your computer and use it in GitHub Desktop.
Save rocarvaj/5b38e7b3cf681ab8b6b95038839429e2 to your computer and use it in GitHub Desktop.
Force pip to install (duplicate) package locally

Citing Marcus Smith (maintainer of pip):

If you think the global site is out of date, and want the latest in the user site, then use:

pip install --upgrade --user SomePackage

If the global site is up to date, and you really just want the same thing duplicated in --user, then use:

pip install --ignore-installed --user SomePackage

(which works correctly now after the merge of #1352, which is to be released in v1.5) How can I make pip install --user always go to ~/.local and not a system-wide directory?

Use both --upgrade and --ignore-installed arguments.

Source: https://stackoverflow.com/a/20304268/162264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment