Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: AttributeError: _dep_map

Tags:

python

pyramid

I have an issue. I'm installing pyramid application on Ubuntu / Python 2.7 on virtual environment. I'm running setup.py as

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

from root project directory and after:

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

What do you think? May be you seen this error and know how fix it?

like image 887
karavanjo Avatar asked Dec 08 '22 13:12

karavanjo


2 Answers

Without knowing your exact setup.py or your code layout: Do have by any chance a module called parser in your path? That's your problem.

like image 150
user2722968 Avatar answered Jan 03 '23 15:01

user2722968


I had this same issue, but there was no parser module I could see. I had to recreate a virtual environment and install requirements.txt.

like image 20
Trent Avatar answered Jan 03 '23 13:01

Trent