|
我从Python网站下载了以下安装程序: Python 2.7.1 Windows Installer(Windows二进制文件 - 不包括源代码)。然后我运行了安装程序,选择了“所有用户”,一切都很好。我将Python安装到默认位置:
C:\Python27
接下来,为了测试Python是否正确安装,我导航到我的Python目录,并在windows cmd提示符下运行“python”命令。它返回以下错误:
ImportError: there is no module called 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 # restore 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
|
|