I'm using pip to install a requirements.txt file in a virtualenv on a server. During the install, I think that I should have updated my requirements.txt file, so I hit Ctrl+C, do a pip freeze, and then restart the pip install. But I now get a very confusing error message (not this exact one, but same exact format):
Source in .../build/Django has version 1.2.3 that conflicts with Django==1.2.4 (from -r requirements/apps.txt (line 3))
It took me a couple minutes to figure out that the already downloaded and unpacked (but not installed) old version was confusing pip. I deleted the "build" directory and restarted the install, and everything worked this time. But it'd be nicer if pip wasn't confused by the presence of the old version in the build directory.
To show that this is a source of confusion for other people too: http://stackoverflow.com/questions/4536103/how-can-i-upgrade-specific-packages-using-pip-a-requirements-file
Just to be clear on the reproducer:
Given a requirements file
When you do venv/bin/pip install -r requirements.txt
And you interrupt the process
And you pip freeze
And you edit the file
Then you get this conflict message
venv/bin/pip install -r requirements.txt
Is that correct?
Pretty much. the pip freeze is probably not essential (after all, it just outputs text). Just installing a requirements.txt file that contains Django==1.2.3, interrupt pip before it's done, edit the requirements.txt file to read "1.2.4" instead and starting the pip install from the (newly edited) requirements.txt file should do it.
This may be fixed with Issue #516
Do you mind - maybe in a virtualenv upgrading pip to the develop branch
pip install pip==dev
And try your reproducer again.
Looks like a duplicate of lots of issues related to build/, but to be exact it looks like a dupe of #413.