python安裝模塊能夠經過如下方式安裝python
easy_installide
Install EasyInstall(sudo apt-get install python-setuptools python-dev build-essential)ui
easy_install mechanize(須要在root權限下).net
Easy install will automatically download the latest source code release and install it.code
Source code releaseget
Download the source from one of the links belowit
Unpack the source distribution and change directory to the resulting top-level directory.io
python setup.py installtable
This is a stable release.class
python setup.py install
root@yangjie-v:/usr/local/lib/python2.6/dist-packages# ls
easy-install.pth mechanize-0.2.4-py2.6.egg
發現安裝了模塊始終使用不了裏面的參數,才發現用戶環境不對,我不是在超級用戶下面,須要切換到超級用戶目錄下