python安裝模塊

python安裝模塊可以通過以下方式安裝

 

easy_install

  1. Install EasyInstall(sudo apt-get install python-setuptools python-dev build-essential)

  2. easy_install mechanize(需要在root權限下)

Easy install will automatically download the latest source code release and install it.

Source code release

  1. Download the source from one of the links below

  2. Unpack the source distribution and change directory to the resulting top-level directory.

  3. python setup.py install

This is a stable release.

      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

 

 

發現安裝了模塊始終使用不了裏面的參數,才發現用戶環境不對,我不是在超級用戶下面,需要切換到超級用戶目錄下

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章