Python 3.x在WIN7下安装

背景:之前建个人站点gnssinfo.com曾从网上download了一个开源的python 2.x版本的工具,用来从163上下载blog;
这两天把python 2.7删掉,然后安装最新版3.3,无法启动,换装3.2同样无法启动,均提示以下错误:

Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can’t find encoding

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information.

用控制台启动,查询版本,报如下错误:

E:\Python32>python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can’t find encoding

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information.

百度不给力,google了N久,终于在python.org网站上找到答案,具体页面为:http://bugs.python.org/issue11288
原网页提示解决方案如下:

I have found a problem and sollution:
previously I have used Python 2.x and when I removed that version and next installed Python32, PYTHONPATH in system variabled indicated still to Python2.x. Removing all python paths to old version solved the problem.

与笔者电脑上问题一样,找到系统高级环境变量设置,将PYTHONPATH更改指向E:\Python32目录。重新从菜单打开IDLE(Python GUI)即可启动。
IDLE启动后,界面提示信息如下:
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32
Type “copyright”, “credits” or “license()” for more information.
>>>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值