Good question!
Python has this tool, called pip, which is python's package manager. It can pull packages from the PyPi repository (think an App Store).
These will handle where packages get installed for you. Almost every package I've found available on the Internet was also available on PyPi.
Along with this, there is another tool that is used in conjunction with pip: virtualenv.
This is similar to ruby's rvm/bundler (I believe, someone please fact check this part).
It allows you to create a "local" set of dependencies for your application. The install directory for packages - while this virtualenv is activate - would be C:\path_to_virtualenv\lib\python\site-packages\ . Installing via python setup.py install
should drop the package into this directory!
A sample workflow that I follow:
cd dev/my_new_app
virtualenv ../venvs/my_new_app
source ../venvs/my_new_app/bin/activate
pip install my_new_dependency
pip freeze > requirements.txt
~~~<coding>~~~
pip freeze will generate a list of all of the packages that you installed (along with versions). > says "put everything on the left into the right", which is a file. Anyone else who wants to start working on your project simply does pip install -r requirements.txt
to get all of your dependencies installed!
If for whatever reason that library you are trying to work with (or an equivilant) is not available in the PyPi repository, the default install directory should now be considered your "install directory" for the setup.py .
Here is an awesome answer by Colonel Panic on installing pip on Windows.
If you decide not to use virtualenv, pip on its own will install to the default python package directory, which is somewhere around C:\\site-packages\