Você pode usar pip
ou easy_install
para instalar módulos python.
$ pip install <package-name>
Editar:
Eu tentei instalar o urllib2
package e ele me disse que o real name of requirement urllib2 is urllib3
. Aqui está o que aconteceu:
pradeep@pradeep-laptop:~$ sudo pip install urllib2
Downloading/unpacking urllib2
Real name of requirement urllib2 is urllib3
Could not find any downloads that satisfy the requirement urllib2
No distributions at all found for urllib2
Storing complete log in /home/pradeep/.pip/pip.log
pradeep@pradeep-laptop:~$ sudo pip install urllib3
Downloading/unpacking urllib3
Downloading urllib3-1.5.tar.gz
Running setup.py egg_info for package urllib3
Installing collected packages: urllib3
Running setup.py install for urllib3
Successfully installed urllib3
Cleaning up...
pradeep@pradeep-laptop:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib3
>>>
Edit2:
Você pode instalar o python-pip a partir do código-fonte.
$ wget http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz
$ tar xzf pip-0.7.2.tar.gz
$ cd pip-0.7.2
$ python setup.py install