[Distutils] "pip install -e ." vs. "python setup.py develop"

Asheesh Laroia lists at asheesh.org
Mon Apr 7 05:01:38 CEST 2014

Hi lovely distutils people,

I have a question, as I prepare for my "Python packaging simplified, for
end users, app developers, and open source contributors" talk. I'm sure
I'll have more; I'll end up probably making a few threads about them, since
they'll come to me at random times.

For years, I've been recommending:

$ python setup.py develop

as a standard way to make something hackable and available in a virtualenv.
I notice that "python setup.py develop --user" exists, which is great, as
it means that you don't even need to bother with the virtualenv.

Having said that, I also notice that:

$ pip install -e .

does the same thing.

Should I be recommending one over the other?

I'm going to learn toward "pip install -e ." even though I haven't been
using it much personally, as it makes the talk more consistent -- I would
then be able to say, "Always use pip for doing your installing." But I
thought I'd ask about this. It seems that "pip install -e ." is the same as
"python setup.py develop" except that pip runs setup.py with setuptools
available, which addresses a problem where if the maintainer of a package's
setup.py file doesn't "from setuptools import setup", then "python setup.py
develop" won't work, whereas "pip install -e ." will always work.

Unless I'm mistaken. So the question is -- can someone sanity-check the

I'm hoping to pretend to be an outsider for the purpose of empathizing with
the audience, and yet be enough of an insider to ask people on this list if
what I'm saying is consistent with Modern PyPA Doctrine (which generally
I'm happy to promote).

-- Asheesh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140406/09f9a905/attachment.html>

More information about the Distutils-SIG mailing list