How to install Python environment in my own account on Dreamhost?

Posted on In QA

How to install Python environment in my own account on Dreamhost so that my application can use the python that I installed by myself instead of the system-wide one?

The post for Bluehost works very well for Dreamhost too:

https://my.bluehost.com/cgi/help/python-install


In short:

mkdir ~/python

cd ~/python

wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz

tar zxfv Python-2.7.2.tgz

find ~/python -type d | xargs chmod 0755

cd Python-2.7.2
./configure --prefix=$HOME/python

make

make install

echo "export PATH=$HOME/python/Python-2.7.2/:$PATH" >> ~/.vimrc

source ~/.bashrc

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *