下载版本
python下载源码python2.7.11安装(记得要下载python 2.7版本的),下载地址:
http://www.python.org/download/
安装步骤为(python 2.7的安装对是否能成功安装skyeye有决定性作用):
编译
注意:没有这个两个编译选项,你会发现有无穷无尽的错误在等着你解决,不过我仍然相信你乐于去解决。
./configure –prefix=/usr/local/python2.7 –enable-shared –enable-unicode=ucs4
make && make install
然后你需要将python的lib库导出,下面是方法:
vim /etc/ld.so.conf 加上include /usr/local/python2.7/lib 保存退出
然后/sbin/ldconfig
说明:python的内部是使用unicode来处理的,但是unicode的使用需要考虑的是它的编码格式有两种,一是UCS-2,它一共有65536个码位,另一种是UCS-4,它有2147483648g个码位。在编译时通过–enable-unicode=ucs2或–enable-unicode=ucs4来指定的。那么我们自己默认安装的python用的什么编码怎么来确定呢?进入python安装后的目录,找到执行python,然后./python
import math,sys
print(“math.pi=={0.pi} sys.maxunicode=={1.maxunicode}”.format(math, sys))
quit()
如果sys.maxunicode==65535,那么就是UCS-2,如果输出是sys.maxunicode==1114111,就是UCS-4编码。
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _sqlite3 _tkinter
bsddb185 dbm dl
gdbm imageop sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
running build_scripts