顯然,答案是可能的。訣竅是將整個堆棧安裝在主機上的其他位置。
所以altinstall蟒蛇,然後easy_intsall,然後點子。這裏是我的日誌中的命令歷史記錄。
cd
mkdir installations
cd installations/
curl -O https://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2
tar xjf Python-2.7.tar.bz2
cd Python-2.7
mkdir -p ~/usr/local
make altinstall prefix=~/usr/local exec-prefix=~/usr/local
~/usr/local/bin/python2.7 -V
ln -s ~/usr/local/bin/python2.7 ~/usr/local/bin/python
echo "export $PATH=~/usr/local/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
cd
mkdir virtualenv
cd virtualenv/
curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
mkdir ~/envs
python virtual-python.py --prefix=~/env/aws
curl -O http://peak.telecommunity.com/dist/ez_setup.py
~/env/aws/bin/python ez_setup.py
echo "export $PATH=~/env/aws/bin:~/usr/local/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
easy_install virtualenv
virtualenv --no-site-packages ~/env/awscli
source ~/env/awscli/bin/activate
pip -V
pip install awscli
這些是我遵循的有用鏈接,可以幫助我實現這一目標。
Install Python in an alternate location
Install Python stack without root privilege
你是不是想用'pip'安裝嗎? '--user'標誌不起作用嗎? – 2014-09-30 15:02:11