Install Python on DreamHost

First, ssh into your server and create a 'python' folder in home directory

cd ~
mkdir python
cd python

Download and extract python source (eg. python 3.5.2)

Download and extract python source (eg. python 3.5.2)

wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
tar xvfJ Python-3.5.2.tar.xz
cd Python-3.5.2

Compile the source and install it in a properly named directory (eg ‘Python35’)

./configure --prefix=$HOME/Python35
make
make install

Add the installation to the PATH variable.

echo '# Python3 PATH' >> ~/.bash_profile
echo 'export PATH=$HOME/Python35/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile

Done.

upgrade pip (optional)

pip3 install --upgrade pip