Updates of pyOpenSSL and pandas using 'pip' fail with “TypeError: resolve() got an unexpected keyword argument 'replace_conflicting'”

前端 未结 2 1125
北恋
北恋 2021-01-14 10:50

When I attempt to update or install any version of pandas or pyOpenSSL(with any instance of sudo pip --[un]install|update [--no-use-wheel] [p

2条回答
  •  心在旅途
    2021-01-14 11:10

    A likely cause is the presence of multiple versions of setuptools, with an older version earlier on the Python path than the newer one. This can be temporarily overcome for the purposes of installation by beginning your invocations of pip with

    PYTHONPATH=/PATH_TO_YOUR_CURRENT_PACKAGES/site-packages pip ...
    

    You can confirm that this is the case by executing

    import pkg_resources
    pkg_resources.__file__
    

    in Python and noting that the pkg_resources.pyc returned is not in the location of your current site packages.

    In some cases this can also be corrected by ensuring that the pkg_resources.pyc in your site packages directory in executed, rather than the one in your system packages directory (e.g., by deleting the latter).

提交回复
热议问题