Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

django - Errors while installing python packages

I 'm not able to install python packages from both pip and easy_install. There's some absurd kind of error that keeps popping up. Kindly help to rectify it.

I get the same errors while using python setup.py install.

Error while installing django-memcached

C:UsersPrafulDesktopdjango-redis-master>easy_install django-memcached
Traceback (most recent call last):
  File "C:Python27Scriptseasy_install-script.py", line 9, in <module>
    load_entry_point('distribute==0.6.27', 'console_scripts', 'easy_install')()
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggsetuptoolscom
mandeasy_install.py", line 1915, in main
    with_ei_usage(lambda:
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggsetuptoolscom
mandeasy_install.py", line 1896, in with_ei_usage
    return f()
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggsetuptoolscom
mandeasy_install.py", line 1919, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "C:Python27libdistutilscore.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggsetuptoolsdis
t.py", line 222, in __init__
    for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggpkg_resources.
py", line 486, in iter_entry_points
    entries = dist.get_entry_map(group)
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggpkg_resources.
py", line 2315, in get_entry_map
    self._get_metadata('entry_points.txt'), self
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggpkg_resources.
py", line 2101, in parse_map
    raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups

Error while installing python-memcache

C:UsersPrafulDesktopmem>python setup.py install
Traceback (most recent call last):
  File "setup.py", line 24, in <module>
    "Topic :: Software Development :: Libraries :: Python Modules",
  File "C:Python27libdistutilscore.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggsetuptoolsdis
t.py", line 222, in __init__
    for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggpkg_resources.
py", line 486, in iter_entry_points
    entries = dist.get_entry_map(group)
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggpkg_resources.
py", line 2315, in get_entry_map
    self._get_metadata('entry_points.txt'), self
  File "C:Python27libsite-packagesdistribute-0.6.27-py2.7.eggpkg_resources.
py", line 2101, in parse_map
    raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. Find get_entry_map(self, group=None): into pythonLibsitepackagespkg_resources\__init__.py. Insert after print self.egg_info
  2. Run python setup.py and look to the last printed - broken package. Remember it, later to install again. Delete the folder of broken package and folder broken_package-version.dist-info. Run again paragraph 2, until the error disappears.
  3. Remove changes from paragraph 1.
  4. python setup.py install 'broken_package'

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...