pip list报错:DEPRECATION: The default format will switch to columns in the future.

一、现象:

      pip list 显示出以下错误:
     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版本是9.0.1话,可以在~/pip/pip.conf配置文件中加入下面的语句,避免这类警告:

    [list]
    format=columns


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

    [list]
    format=columns

    一般出现这种警告的都是pip9,可以把它更新到最新的版本,直接运行如下命令即可:


python -m pip install --upgrade pip 
我更新之后再用pip list就没有提示警告了。

posted @ 2019-09-05 22:17  igoodful  阅读(6900)  评论(0编辑  收藏  举报