So I thought it would be cool to have a package installer, and have it be callable via a get request from a browser. The following gist is the code I have for the installer:
https://gist.github.com/anonymous/5243199
It can be used like:
from Pypi import Installer
Installer('Flask', '0.9').install()
It will attempt to download the package (no dependencies though) via Pypi. Keep in mind that Pypi is case sensitive, so make sure the first argument is correct (for instance flask is 'Flask' but bottle is 'bottle'). If you are unsure, check the download URL on Pypi's site.
It also currently only checks for two types of sources in the tarball. Either a directory with the package name (lowercase) or a single python file with the package name (like bottle.py). This seems to have covered all the packages I have attempted (but maybe not everything).
Lastly, keep in mind, even though you can install a package, doesn't mean it will work.
Next, to create a web server, first use the installer to install Flask, Werkzeug, and Jinja2:
from Pypi import Installer
Installer('Flask', '0.9').install()
Installer('Werkzeug', '0.8.3').install()
Installer('Jinja2', '2.6').install()
Then download this gist which has a demo Flask Server:
https://gist.github.com/anonymous/5243230
After running this Flask Server, it will tell you your IP address. In a browser, you can now install packages on your device by going to 'http://IP_ADDRESS:5000/install?package=Flask&version=0.9' while it is running, replacing of course the package and version you want.
The server is more of a demo, it would probably be better off serving some form instead of using the URL. Also, note that Flask's debug mode does not appear to work, as it complains it is not running on the main thread.
Let me know if you improve on anything!