python - What does the error "resolve() got an unexpected keyword argument 'replace_conflicting'" mean? -


when update packages in python installation using pip get

typeerror: resolve() got unexpected keyword argument 'replace_conflicting' 

i error packages , not others, , have asked ways work around (ideally while continuing use pip) in specific cases encounter it; question here error means in first place , might cause.

what error mean , causing it?


downloading/unpacking xattr   downloading xattr-0.7.5.tar.gz   running setup.py (path:/private/tmp/pip_build_root/xattr/setup.py) egg_info package xattr     traceback (most recent call last):       file "<string>", line 17, in <module>       file "/private/tmp/pip_build_root/xattr/setup.py", line 67, in <module>         cmdclass={'build': cffi_build},       file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup         _setup_distribution = dist = klass(attrs)       file "/library/python/2.7/site-packages/setuptools/dist.py", line 239, in __init__         self.fetch_build_eggs(attrs.pop('setup_requires'))       file "/library/python/2.7/site-packages/setuptools/dist.py", line 264, in fetch_build_eggs         replace_conflicting=true     typeerror: resolve() got unexpected keyword argument 'replace_conflicting'     complete output command python setup.py egg_info:     traceback (most recent call last):    file "<string>", line 17, in <module>    file "/private/tmp/pip_build_root/xattr/setup.py", line 67, in <module>      cmdclass={'build': cffi_build},    file "/system/library/frameworks/python.framework/versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup      _setup_distribution = dist = klass(attrs)    file "/library/python/2.7/site-packages/setuptools/dist.py", line 239, in __init__      self.fetch_build_eggs(attrs.pop('setup_requires'))    file "/library/python/2.7/site-packages/setuptools/dist.py", line 264, in fetch_build_eggs      replace_conflicting=true  typeerror: resolve() got unexpected keyword argument 'replace_conflicting' 

this caused having 2 different versions of setuptools: 1 in /system/library/frameworks/python.framework/versions/2.7 , in /library/python/2.7/site-packages. somehow, setuptools.dist.distribution.fetch_build_eggs in newer version calls pkg_resources.working_set.resolve older version. old version of resolve doesn't support replace_conflicting argument.

on os x lion machine, able fix problem this:

$ sudo python /system/library/frameworks/python.framework/versions/2.7/extras/lib/python/easy_install.py -u setuptools $ sudo easy_install -u pip 

that is, used old version of easy_install upgrade easy_install , used upgrade pip.

this fixed problem on system because modified sys.path new version of pkg_resources under /library/python loaded before old version can still found under /system/library/frameworks. alternative workaround might modify sys.path temporarily using pythonpath environment variable, see the python manual.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -