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就沒有提示警告了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM