#Python2.7#安装报错处理

今天开始《数据科学入门》的阅读,第2章节是Python速成,这是我感兴趣的语音,我需要下载安装一个编辑器

添加环境变更: path  D:\Python27

编译报错:

Traceback (most recent call last):

File ".\sublime_plugin.py", line 337, in run_

File ".\exec.py", line 154, in run

File ".\exec.py", line 48, in __init__

File ".\subprocess.py", line 633, in __init__

File ".\subprocess.py", line 842, in _execute_child

UnicodeEncodeError: 'ascii' codec can't encode characters in position 19-21: ordinal not in range(128)

报错原因为当前 py 脚本位于包含中文字符串的路径下,解决方法为修改 exec.py 文件内容,在45行之前添加:

for index, arg in enumerate(arg_list[:]):

arg_list[index] = arg.encode(sys.getfilesystemencoding())

你可能感兴趣的:(#Python2.7#安装报错处理)