一、現象:
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就沒有提示警告了。
