Most recently tested on macOS Sierra (10.12.6)
- Download the installation script;
curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py - Run the installation, appending the
--userflag;python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip - Make sure
~/Library/Python/2.7/binis in your$PATH. Forbashusers, edit thePATH=line in~/.bashrcto append the local Python path; ie.PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes,source ~/.bashrc. - Use pip! Remember to append
--userwhen installing modules; ie.pip install <package_name> --user
There is much discussion about making the user site the default for installation. See Issue 1668.
I'm trying to figure out where pip installs packages on MacOS Mojave. If I
pip install cookiecutter- not in a venv - where do the files go? I ask because wherever it is does not seem to be in my $PATH - I can't typecookiecutter <source> <target>which is supposed to work. I get acommand not founderror. I installed Cookiecutter for my base Python install (at least I think I did) rather than in a venv because I want to be able to use it to create new projects from scratch.