Python:AttributeError:_dep_map

时间:2013-09-02 17:08:27

标签: python pyramid

我有一个问题。 我正在虚拟环境中的Ubuntu / Python 2.7上安装金字塔应用程序。 我正在运行setup.py作为

../bin/python2.7 setup.py develop

从根项目目录开始:

Traceback (most recent call last):
  File "setup.py", line 48, in <module>
    """,
  File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/local/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/local/lib/python2.7/site-packages/setuptools/dist.py", line 301, in finalize_options
    ep.require(installer=self.fetch_build_egg)
  File "/local/lib/python2.7/site-packages/pkg_resources.py", line 2272, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer)))
  File "/local/lib/python2.7/site-packages/pkg_resources.py", line 2489, in requires
    dm = self._dep_map
  File "/local/lib/python2.7/site-packages/pkg_resources.py", line 2543, in __getattr__
    raise AttributeError(attr)
AttributeError: _dep_map
你怎么看? 你可能看到这个错误并知道如何解决它?

2 个答案:

答案 0 :(得分:11)

在不知道您的确切setup.py或您的代码布局的情况下:您的路径中是否有任何名为parser的模块?那是你的问题。

答案 1 :(得分:1)

我有同样的问题,但我没有看到解析器模块。我不得不重新创建一个虚拟环境并安装requirements.txt。