$ mkdir -p ~/.local/lib/python2.6
$ cd .local
$ wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz
$ tar xzvf Python-2.6.4.tgz
$ cd Python-2.6.4
$ ./configure --prefix=$HOME/.local/lib/python2.6
$ make
$ make install
$ cd ~
$ ln -s .local/lib/python2.6/bin/python bin/python2.6
运行[~/.local/setuptools-1.3.2]# easy_install sqlalchemy
Traceback (most recent call last):
File "/usr/bin/easy_install", line 9, in
load_entry_point('distribute==0.6.10', 'console_scripts', 'easy_install')()
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1715, in main
with_ei_usage(lambda:
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1696, in with_ei_usage
return f()
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1719, in
distclass=DistributionWithoutHelpCommands, **kw
File "/usr/lib64/python2.6/distutils/core.py", line 126, in setup
dist.parse_config_files()
File "/usr/lib64/python2.6/distutils/dist.py", line 374, in parse_config_files
parser.read(filename)
File "/usr/lib64/python2.6/ConfigParser.py", line 286, in read
self._read(fp, filename)
File "/usr/lib64/python2.6/ConfigParser.py", line 482, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /home2/sincoslong/.pydistutils.cfg, line: 1
后来装了2.7.6 make的时候出现错误.也没安装成功.现在版本还是2.6.6 之前python2.7的文件夹被我删掉了.
make错误提示:ibpython2.7.a(posixmodule.o): In function `posix_tmpnam':
/home2/sincoslong/.local/Python-2.7.6/./Modules/posixmodule.c:7545: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
libpython2.7.a(posixmodule.o): In function `posix_tempnam':
/home2/sincoslong/.local/Python-2.7.6/./Modules/posixmodule.c:7492: warning: the use of `tempnam' is dangerous, better use `mkstemp'
./python -E -S -m sysconfig --generate-posix-vars
Could not find platform dependent libraries
Consider setting $PYTHONHOME to [:]
Traceback (most recent call last):
File "./setup.py", line 2232, in
main()
File "./setup.py", line 2227, in main
'Lib/smtpd.py']
File "/home2/sincoslong/.local/Python-2.7.6/Lib/distutils/core.py", line 125, in setup
dist.parse_config_files()
File "/home2/sincoslong/.local/Python-2.7.6/Lib/distutils/dist.py", line 390, in parse_config_files
parser.read(filename)
File "/home2/sincoslong/.local/Python-2.7.6/Lib/ConfigParser.py", line 305, in read
self._read(fp, filename)
File "/home2/sincoslong/.local/Python-2.7.6/Lib/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /home2/sincoslong/.pydistutils.cfg, line: 1
'tall] \n'
make: *** [sharedmods] Error 1
[email protected] [~/.local/Python-2.7.6]# vim .pydistutils.cfg
先安装的2.7 实际是 2.6.6
在安装setuptool遇到问题.决定重新安装.
之前的2.6.6 没有卸载.担心卸不干净.
直接下载2.7.6
按照教程步骤安装.步骤按照这个来的http://www.iteye.com/topic/544806
到编译的时候就出现问题
然后 python 版本没有变.没有安装成功.
现在我该如何?
显示什么就是什么版本,给我的话就是全部卸掉,然后再装,系统是RH系?还是Debian系啊?用源里面的版本不就好了吗?