今天安装了PyScripter编辑器,刚要写代码,突然就出现异常: <span style="font-size:14px;color:#ff0000;">>>> Traceback (most recent call last): File "<string>", line 378, in findModuleOrPackage File "<string>", line 367, in f
site " This module is automatically imported during initialization. The automatic import can be suppressed using the interpreter’s -S option. Importing this module will append site-specific paths to the module search path and add a few builtins. &quo
另外 Python 中一个比较常见的问题是编码问题,若遇到类似"UnicodeEncodeError: 'ascii' codec can't encode character u'\u6211′ in position 0: ordinal not in range(128)"的问题,可以在 Python 的安装目录(默认为C:\Python27)下的 Lib\site-packages 文件夹中新建一个文件sitecustomize.py,添加如下代码并保存: import sys