python 安装经常遇到的问题

Microsoft Visual C++ 9.0 is required Unable to find .txt

https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266 下载并安装

IndentationError: unexpected indent

错误是 python 编译器是在告诉你"Hi,老兄,你的文件里格式不对了,可能是tab和空格没对齐的问题",所有 python 对格式要求非常严格。
如果是 IndentationError: unindent does not match any outer indentation level错误表明,你使用的缩进方式不一致,有的是 tab 键缩进,有的是空格缩进,改为一致即可。

Aptana Studio 3 引入Object问题

Window->Preferences->PyDev->Editor->Code Analysis->Undefined
添加 ,objects

pip install提示编码错误

在Python 环境下,使用PiP 命令安装时,报错提示:
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 1-5: ordinal not in range(128)

  1. 找到路径\Lib\site-packages
  2. 路径下新建文件 sitecustomize.py ,文件内容为:
    import sys
    reload(sys)
    sys.setdefaultencoding(‘utf-8’)
  3. 之后再使用pip 安装的时候,就解决问题了

python安装问题

(python-2.7.10.amd64.msi)
下载地址 http://www.python.org/download/
安装完成
修改系统path 添加C:\Python27
测试 cmd->python->print ‘hello world’ ->ctrl+c 结束命令
安装出错:win10环境
在这里插入图片描述
C:\Windows\temp 的权限修改为完全控制

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值