http://www.2cto.com/os/201305/213725.html
安裝pip
Ubuntu下安裝pip的方法
安裝pip的方法:
Install pip and virtualenv for Ubuntu 10.10 Maverick and newer
$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
$ sudo pip install --upgrade virtualenv
For older versions of Ubuntu
Install Easy Install
$ sudo apt-get install python-setuptools python-dev build-essential
Install pip
$ sudo easy_install pip
Install virtualenv
$ sudo pip install --upgrade virtualenv
安裝mysql拓展包可以:sudo pip install mysql-python
安裝其他的包只要pip + 包的名字 就行了 很方便妄帘。而且安裝完的mysqlib用起來沒一點問題,
在windows下還要修改下源文件阀湿。寫程序還是在linux下好啊春宣。
安裝mysql
apt-get install mysql-server
安裝lxml
http://www.udpwork.com/item/11846.html
---
pip install lxml編譯失敗問題解決
youngsterxyf 發(fā)表于 2013年03月17日 00:00 | Hits: 1152
Tag: Python
以前在遇到這個問題時,都是偷懶使用sudo apt-get install python-lxml(Debian系的Linux發(fā)行版)直接安裝已打包好的deb包塔次。但一方面這樣安裝的不是最新的庫出吹,另一方面我希望把所有的Python第三方庫都限制在virtualenv中使用谜慌,所以希望使用pip install lxml,那么這個問題就必須解決了对湃。
Google了一把崖叫,在這里找到了解答。
其實在編譯失敗的log里熟尉,已經(jīng)有提示:
make sure the development packages of libxml2 and libxslt are installed
所以正確編譯需先安裝libxml2和libxslt這兩個包归露。
sudo apt-get install libxml2sudo apt-get install libxslt
另外,還需安裝Python開發(fā)包python-dev:
sudo apt-get install python-dev
OK斤儿,再執(zhí)行pip install lxml就沒問題啦剧包。
sudo apt-get install libxml2-dev libxslt1-dev