pip install xmltodict不能正常工作

时间:2014-02-11 10:47:53

标签: python centos

我在为python安装xmltodict包时遇到以下错误。

pip install xmltodict
Downloading/unpacking xmltodict
  Running setup.py egg_info for package xmltodict
    Traceback (most recent call last):
      File "", line 16, in 
      File "/tmp/pip-build-root/xmltodict/setup.py", line 36, in 
        setup_requires=['nose>=1.0', 'coverage'],
      File "/usr/lib/python2.6/distutils/core.py", line 113, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.6/site-packages/distribute-0.6.38-py2.6.egg/setuptools/dist.py", line 221, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/usr/lib/python2.6/site-packages/distribute-0.6.38-py2.6.egg/setuptools/dist.py", line 245, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/usr/lib/python2.6/site-packages/distribute-0.6.38-py2.6.egg/pkg_resources.py", line 598, in resolve
        raise VersionConflict(dist,req) # XXX put more info here
    pkg_resources.VersionConflict: (nose 0.10.4 (/usr/lib/python2.6/site-packages), Requirement.parse('nose>=1.0'))
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "", line 16, in 

  File "/tmp/pip-build-root/xmltodict/setup.py", line 36, in 

    setup_requires=['nose>=1.0', 'coverage'],

  File "/usr/lib/python2.6/distutils/core.py", line 113, in setup

    _setup_distribution = dist = klass(attrs)

  File "/usr/lib/python2.6/site-packages/distribute-0.6.38-py2.6.egg/setuptools/dist.py", line 221, in __init__

    self.fetch_build_eggs(attrs.pop('setup_requires'))

  File "/usr/lib/python2.6/site-packages/distribute-0.6.38-py2.6.egg/setuptools/dist.py", line 245, in fetch_build_eggs

    parse_requirements(requires), installer=self.fetch_build_egg

  File "/usr/lib/python2.6/site-packages/distribute-0.6.38-py2.6.egg/pkg_resources.py", line 598, in resolve

    raise VersionConflict(dist,req) # XXX put more info here

pkg_resources.VersionConflict: (nose 0.10.4 (/usr/lib/python2.6/site-packages), Requirement.parse('nose>=1.0'))

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/xmltodict
Storing complete log in /root/.pip/pip.log

1 个答案:

答案 0 :(得分:0)

试试这个

$ sudo yum install python-xmltodict

并访问此github issue以获取更多信息