What does "pip install" do?
ben+python at benfinney.id.au
Wed Jan 14 12:08:56 CET 2015
Fabien <fabien.maussion at gmail.com> writes:
> On 12.01.2015 23:46, Chris Angelico wrote:
> > As far as I know, it's equivalent to three steps:
> > 1) Download the appropriate version of a package (the latest, if you
> > didn't say otherwise)
> > 2) Extract that package
> > 3) Run 'python setup.py'.
> > What setup.py does is up to the package, but for a pure-Python
> > package it should simply create something in site-packages. It might
> > do a lot more, though - compiling C or Fortran code, for instance.
> Thanks Chris. I should then rephrase my question to "what does python
> setup.pt do?" ;-).
You're re-phrasing that as a question which has already been answered,
though. What ‘setup.py’ actually does is up to each package. Some are
quite small and simple; others are large complex applications.
> My point was also that I think that this information (mostly: what
> will change on my system or my virtual env when I install a python
> package?) could/should be provided in the mentioned resources:
> "Python Packaging Authority" website
Why, though? The point of an end-user program is that an end-user should
not need to be bothered by what it does internally, only what the
observable behaviour is. In the case of ‘pip install’, the observable
behaviour is that a package is installed and ready for use.
Your questions drive ever toward “What is the *implementation* of this?”
which is not material suitable for a user guide — especially when the
implementation details are in much more appropriate documents
If you want to learn about the internals and the implementation details,
you are expressly moving beyond the scope of the user guide. There's
nothing wrong with doing that, but you need to recognise the shift and
look for the appropriate documentation.
\ “The most common way people give up their power is by thinking |
`\ they don't have any.” —Alice Walker |
More information about the Python-list