更新pip后yum安装报错UserWarning: Setuptools will stop working on Python 2

郭恩洲_OSC博客 发布于 04/13 20:30
阅读 296
收藏 0
YUM

/usr/lib/python2.7/site-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2
************************************************************
You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release (no sooner than 2020-04-20).
Please ensure you are installing
Setuptools using pip 9.x or later or pin to `setuptools<45`
in your environment.
If you have done those things and are still encountering
this message, please comment in
https://github.com/pypa/setuptools/issues/1458
about the steps that led to this unsupported combination.
************************************************************
  sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60)
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.
 

加载中
0
郭恩洲_OSC博客
郭恩洲_OSC博客

解决办法:
参考这个github其中一网友的回复,卸载重装 pip、setuptools、wheel,使它们回到与系统 python 相适应的版本,之后不再报错。

python 3 在终端输入:

python3 -m pip uninstall pip setuptools wheel
yum install  python3-setuptools python3-wheel python3-pip

python 2 在终端输入:

python -m pip uninstall pip setuptools wheel
yum install python-setuptools python-wheel python-pip 
 

 
 
0
sprouting
sprouting

python 我已经放弃了,这种依赖问题太恶心了,要玩的时候弄docker作为统一环境,防止环境更换导致的问题

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部