
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.
>>>
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)为: 

本文章尚未被引用。
下一篇: django 404.html问题
上一篇: linux reload 配置文件

