--userisn't the default (and neither is creating a virtualenv), and therefore the default mode of
pipis still to fail. Given where Pip sits in the ecosystem, it might not be able to fully fix this. But hopefully a more comprehensive tool like Pipenv might obsolete this terrible, terrible website.
pip, virtualenv, and virtualenvwrapper are all great tools, but their out-of-the-box configuration, especially for new users, is basically broken. All the useful, advanced features that experienced python developers use are hidden behind a bunch of command-line options you need to search around in the documentation to find, and even then, some of them have to match each other in ways which are not immediately clear.
In the future, pip should be easier to use, but right now some of these features are bogged down in long discussions.
So welcome to the web site of the PIP OF THE FUTURE!
The following shell script and Mac application will set up your
command-line environment to run
pip in such a way that
everything works by default.
You need a Mac OS X or Linux system with Python already installed.
Download the shell script or application and run it. (The application is currently unsigned, so on a mac with default settings, you may need to right-click and go to 'open' rather than double click; sorry about that.)
Once it has run and installed
pip, you should be able to
pip install whatever you like. This will, by default,
install code into your home directory.
However, if you wish to have a clean python environment for each project
you're working on, you can also create virtualenvs with
mkvirtualenv command, as usual for virtualenvwrapper.
If you are working on a virtualenv,
pip install will install
into the active virtualenv and not your home directory.
If you have to install things repeatedly into virtualenvs,
wheel foo before
pip install foo will give you
This project is by Glyph.
I created this as a proof of concept of several things:
If you're on Debian or Ubuntu,
sudo apt-get install build-essential python-dev.
If you're on the Mac, hopefully you're on Mavericks. If so,
xcode-select --install in a Terminal window.
If you're on Fedora,
sudo yum install python-devel.
I feel your pain, really, I do. But Windows is an entirely different, unrelated set of problems. Particularly, getting a C compiler that matches your Python version is nearly impossible, and outside the scope of issues this tool intends to address.
The shell script itself is available under the MIT license.
The Mac application is available under the GPLv2, as per the terms of the license of Platypus, the tool used to create it.