python35&&python27在windows启动时报错解决方案

cmd>python3

 Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x00001f28 (most recent call first): 
 
cmd>python2
No modules named XX
 
 
原因:环境变量更改后造成的问题。需要修改环境变量增加一些路径:
 
%python35%
D:\Program Files\Python35\Scripts\;D:\Program Files\Python35\;D:\Program Files\Python35\Lib;D:\Program Files\Python35\Lib\site-packages;D:\Program Files\Python35\DLLs
 
%python27%
D:\Program Files\Python27\;D:\Program Files\Python27\Scripts;D:\Program Files\Python27\Lib;D:\Program Files\Python27\Lib\site-packages;D:\Program Files\Python27\DLLs
 
在环境变量中增加之后完美生效
posted @ 2016-03-21 09:42  南非波波  阅读(1499)  评论(0编辑  收藏  举报