2008-12-18
周海汉/文 ablozhou at gmail.com http://blog.csdn.net/ablo_zhou
首先,到www.python.org去下载最新的3.0版:
wget http://www.python.org/ftp/python/3.0/Python-3.0.tgz
大小11M
tar zxvf Python-3.0.tgz
解压后执行
$./configure
通过
$make
出这么一个错误: make: *** [sharedmods] 错误 1
查找网上说是locale的问题:
"Python fails
silently on bad locale" bug:
http://bugs.python.org/issue2173
$locale
LANG=zh_CN.UTF-8
LC_COLLATE="zh_CN.GB2312"
LC_CTYPE="zh_CN.GB2312"
LC_MESSAGES="zh_CN.GB2312"
LC_MONETARY="zh_CN.GB2312"
LC_NUMERIC="zh_CN.GB2312"
LC_TIME="zh_CN.GB2312"
LC_ALL=zh_CN.GB2312
是LC_CTYPE的值zh_CN.GB2312不是对Python合法的值,
$ export LC_ALL=zh_CN.UTF-8
$ locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8
$make
总体成功了,但出如下的错误:
Failed to find the necessary bits to build these modules:
_tkinter
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
这是图形库,可以不管。
$make install
....
* Note: not installed as 'python'.
* Use 'make fullinstall' to install as 'python'.
* However, 'make fullinstall' is discouraged,
* as it will clobber your Python 2.x installation.
安装成功,但没有替换原来的2.x的版本。如果想替换,可以执行”make fullinstall”
执行:
$ python3.0
Python 3.0 (r30:67503, Dec 18 2008, 16:31:33)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
如非注明转载, 均为原创. 本站遵循知识共享CC协议,转载请注明来源
FEATURED TAGS
css
vc6
http
automake
linux
make
makefile
voip
乱码
awk
flash
vista
vi
vim
javascript
pietty
putty
ssh
posix
subversion
svn
windows
删除
编译
多线程
wxwidgets
ie
ubuntu
开源
c
python
bash
备份
性能
scp
汉字
log
ruby
中文
bug
msn
nginx
php
shell
wordpress
mqueue
android
eclipse
java
mac
ios
html5
js
mysql
protobuf
apache
hadoop
install
iocp
twisted
centos
mapreduce
hbase
thrift
tutorial
hive
erlang
lucene
hdfs
sqoop
utf8
filter
草原
yarn
ganglia
恢复
scrapy
django
fsimage
flume
tail
flume-ng
mining
scala
go
kafka
gradle
cassandra
baas
spring
postgres
maven
mybatis
mongodb
https
nodejs
镜像
心理学
机器学习
Keras
theano
anaconda
docker
spark
akka-http
json
群论
区块链
加密
抽象代数
离散对数
同余
欧拉函数
扩展欧几里德算法
ES6
node-inspect
debug
win10
vscode
挖矿