Sites-packages vs Build Extension

A forum for general discussion of the Python programming language.

Sites-packages vs Build Extension

Postby bliss » Thu May 09, 2013 10:02 am

Hi

I'm just starting to play around with Python...
I have downloaded a Package for Python.
Inside the readme file it says:

For python version 2.x or 3.x
-----------------------------

- To install in sites-packages: « python setup.py install »
- To build extension only: « python setup.py build »


What's the difference between sites-packages and build extension?
When is it suitable to use any of them?

Is the "sites-packages" referring to websites written in python????

Or are they effectively the same?

Thank you..
bliss
 
Posts: 15
Joined: Thu May 09, 2013 3:42 am

Re: Sites-packages vs Build Extension

Postby setrofim » Thu May 09, 2013 10:14 am

The first option will install the library. The second option will only build it (I'm guessing the library includes a C extension), but will not install it. You would use the second option if you have an unsual setup and want to install the package manually. 99.99% of the time, you want the first option (to install). site-packages refers to the location (on your computer) where Python looks for 3rd party libraries, e.g. on Windows it would be something like C:\Python27\Lib\site-packages. The site-packages subdirectly is used to distinguish 3rd party libraries form the standard modules. The word "site" in this case refers to the site on which Python is deployed (i.e. your computer).
setrofim
 
Posts: 288
Joined: Mon Mar 04, 2013 7:52 pm

Re: Sites-packages vs Build Extension

Postby bliss » Thu May 09, 2013 10:28 am

Thank you
bliss
 
Posts: 15
Joined: Thu May 09, 2013 3:42 am


Return to General Discussions

Who is online

Users browsing this forum: W3C [Linkcheck] and 3 guests