相关疑难解决方法(0)

Python(Windows) - ImportError:没有名为site的模块

我是第一次尝试安装Python.我从Python网站下载了以下安装程序: Python 2.7.1 Windows Installer(Windows二进制文件 - 不包括源代码).然后我运行了安装程序,选择了"所有用户",一切都很好.我将Python安装到默认位置:

C:\Python27
Run Code Online (Sandbox Code Playgroud)

其次,要测试的Python被正确安装,我浏览到我的Python目录,并运行在Windows中的"蟒蛇"命令命令提示符.它返回以下错误:

ImportError:没有名为site的模块

当我做'python -v'时,我得到以下内容:

#installing zipimport hook
import zipimport # builtin

#ImportError: No module named site #installed zipimport hook #clear builtin ._
#clear sys.path #clear sys.argv
#clear sys.ps1 #clear sys.ps2
#clear sys.exitfunc #clear sys.exc_type
#clear sys.exc_value #clear sys.exc_traceback
#clear sys.last_type #clear sys.last_value
#clear sys.last_traceback #clear sys.path_hooks
#clear sys.path_importer_cache #clear sys.meta_path
#clear sys.flags #clear sys.float_info
#restore sys.stdin #恢复sys.stdout
#restore sys.stderr #cleanup main
#cleanup [1 ] zipimport #cleanup [1] signal
#cleanup[1 …

python windows installation module environment-variables

99
推荐指数
8
解决办法
25万
查看次数