python 更新第三方库时,pip list报错:DEPRECATION: The default format will switch to columns in the future.

错误提示:
DEPRECATION: The default format will switch to columns in the future. You can use –format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.

一种解决办法是修改配置文件~/pip/pip.conf,以避免警告,方法链接如下:
https://blog.csdn.net/u013066730/article/details/54580948

解决方案:

如果你的PIP版本是9.0.1话,可以在~/pip/pip.conf配置文件中加入下面的语句,避免这类警告:

[list]
format=columns


Win7系统自己创建%APPDATA%\pip\pip.ini文件,添加如下文件内容:

[list]
format=columns

 


我的方法——更新pip。
一般出现这种警告的都是pip9,可以把它更新到最新的版本,直接运行如下命令即可:
python -m pip install --upgrade pip  


我更新之后再用pip list就没有提示警告了。
————————————————
版权声明:本文为CSDN博主「木女Dawn」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/sinat_37998852/article/details/80271642

posted @ 2019-09-29 11:58  npc8  阅读(577)  评论(0)    收藏  举报