Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to install and use pip without sudo or admin on macOS

Install and use pip on macOS without sudo / admin access

Most recently tested on macOS Sierra (10.12.6)

  1. Download the installation script; curl -o ~/Downloads/
  2. Run the installation, appending the --user flag; python ~/Downloads/ --user. pip will be installed to ~/Library/Python/2.7/bin/pip
  3. Make sure ~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.
  4. Use pip! Remember to append --user when installing modules; ie. pip install <package_name> --user


There is much discussion about making the user site the default for installation. See Issue 1668.


This comment has been minimized.

Copy link

zeeteegee commented Jul 25, 2018

Weird, I tried this on a youtube video, the same formula, yet copying the code from 1. and 2. on this worked.

Thank you. ( I am operating python 3.7 as well)


This comment has been minimized.

Copy link

robertherdzik commented Oct 12, 2018

❤️ thanks!


This comment has been minimized.

Copy link

dotku commented Apr 2, 2019

I don't like "--user" postfix either :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.