【问题标题】:Python 2.6.7 not initialing in windowsPython 2.6.7 未在 Windows 中初始化
【发布时间】:2011-10-23 18:33:17
【问题描述】:

我正在尝试让 Python 运行以与 Blender 一起使用。我有 64 位 Vista SP2。 2.6.7 蟒蛇。当我启动 python 时,命令提示符会告诉我这个

'imprt site' failed; use -v for traceback
Traceback <most recent call last>:
File "c:\Python26\Scripts\pypm-script.py", line 5, in <module>
Import Error: No module named pkg_resources

所以,我打开了 pypm-script.py

#!python2.6.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pypm==1.3.4','console_scripts','pypm'
__requires__ = 'pypm==1.3.4'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
sys.exit(
load_entry_point('pypm==1.3.4', 'console_scripts', 'pypm')()
)

这很令人沮丧,因为不知道如何阅读代码或如何使用 Python!我希望这很容易解决。

【问题讨论】:

  • pkg_resources 不存在,如果没有安装,请安装。如果有,请搜索它以找到目录。

标签: python setuptools activepython pypm


【解决方案1】:

文件pypm-script.py(和pkg_resources)来自ActivePython。您可能必须在 ActivePython 之上安装了不同的 Python。我可以想到两种方法来解决这个问题:

  1. 卸载 Python,删除 C:\Python26 并安装 ActivePython 2.6(或 2.7),或者
  2. 删除 C:\Python26\Scripts\pypm*C:\Python26\Lib\site-packages\pypm*

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-09-06
    • 2010-10-14
    • 2020-10-16
    • 2015-01-29
    • 2020-12-07
    • 2011-08-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多