ImportError:Windows上没有名为site的模块
我是第一次尝试安装Python。我从Python网站下载了以下安装程序: Python 2.7.1 Windows Installer(Windows二进制文件 - 不包括源代码)。然后我运行了安装程序,选择了“所有用户”,一切都很好。我将Python安装到默认位置:
C:\Python27
接下来,为了测试Python是否正确安装,我导航到我的Python目录,并在windows cmd提示符下运行“python”命令。它返回以下错误:
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] exceptions#cleanup[1] _warnings#cleanup sys#cleanup builtin#cleanup ints: 6 unfreed ints#cleanup floats
当我做dir时,C:\Python27\Lib\site.py*我得到以下内容:
C:\ Users \ Mimminito> dir C:\ Python27 \ Lib \ site.py *
驱动器C中的卷没有标签。
卷序列号为DAB9-A863C:\ Python27 \ Lib的目录
13/11/2010 20:08 20,389 site.py
1文件20,389字节
0 Dir(s)694,910,976字节免费
有任何想法吗?
素胚勾勒不出你
翻过高山走不出你
相关分类