下载了2.7版的gzfile
mkdir ~/src
mkdir ~/.localpython
cd ~/src
wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz
tar -zxvf Python-2.7.1.tar.gz
cd Python-2.7.1
make clean
./configure --prefix=/home//.localpython
make
make install
都没问题。进到.localpython/bin/里面run python2.7的时候,报错:
Could not find platform independent libraries
Could not find platform dependent libraries
Consider setting $PYTHONHOME to [:]
ImportError: No module named site
请多指教
d****i 发帖数: 4809
2
可能是library missing吧,try
ldd -v ~/.localpython/bin/python
and find if there is any lib missing
【在 x******m 的大作中提到】 : 下载了2.7版的gzfile : mkdir ~/src : mkdir ~/.localpython : cd ~/src : wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz : tar -zxvf Python-2.7.1.tar.gz : cd Python-2.7.1 : make clean : ./configure --prefix=/home//.localpython : make
n******7 发帖数: 12463
3
不说了吗?
Consider setting $PYTHONHOME to [:]
另外用python env装local版本很方便