载入中
自定义HTML载入中... loading
在dreamhost上安装自己的python [转贴 2006-11-18 12:53:03]   
字体变小 字体变大
Create a Custom Python Installation

Because of DH’s current Python setup (the python-dev package is not installed... although they will install it if you ask them to), you will need to create a custom Python installation for your account. Issue the following commands from the directory where the Python-X.X.X.tgz file is located:
#Unpack Python
tar -zxvf Python-2.4.2.tgz

#Change to the Python directory
cd Python-2.4.2

#Run configure and enable Unicode
./configure --prefix=$HOME/lib --enable-unicode=ucs4
make
make install

Python is now installed, however, you will need to make your installation the default version:
# Create a home directory for Python
mkdir $HOME/bin
mkdir $HOME/bin/python
mkdir $HOME/bin/python/bin

# Create a link to the python executable.
ln -s $HOME/lib/bin/python $HOME/bin/python/bin/python

# Edit your bash_profile
cd ~
vim .bash_profile

# Add the following line then save the file:
export PATH=$HOME/bin/python/bin:$HOME/lib/bin:$PATH

# Reload the file
source ~/.bash_profile

Type 'python'. You should see output similar to the following:
Python 2.4.2 (#3, Dec 10 2005, 10:22:59)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
票数:
什么是“我顶”?
点击数:    评论数:
本文章引用通告地址(TrackBack Ping URL)为:
本文章尚未被引用。
发表评论
大 名:
(不填写则显示为匿名者)
网 址:
(您的网址,可以不填)
标 题:
内 容:
请根据下图中的字符输入验证码:
(您的评论将有可能审核后才能发表)
和讯个人门户 v1.0 | 和讯部落 | 客服中心