在Dreamhost上搭建python2.6环境
by z9g
Dreamhost默认有python2.4和python2.5,想用python2.6就得自己安装了,下面是安装python2.6的步骤:
1. python
wget http://www.python.org/ftp/python/2.6.5/Python-2.6.5rc2.tgz tar xzvf Python-2.6.5rc2.tgz cd Python-2.6.5rc2 ./configure --prefix=/your/path/to/install echo "export \$PATH=\$PATH:/your/path/to/insall/bin" >> ~/.bash_profile
2. setuptools
到 http://pypi.python.org/pypi/setuptools 下载 Python2.6 相应版本的 setuptools
. ~/.bash_profile wget http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086 chmod +x setuptools-0.6c11-py2.6.egg ./setuptools-0.6c11-py2.6.egg
3. MySQLdb
easy_install-2.6 easy_install MySQL-python
注意:用easy_install的方式安装MySQLdb, 用的名字是MySQL-python