Python pip跳出警告
Published in
2 min readJan 10, 2017
macOS更新完pip(9.0.1)之後使用
$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.
雖然警告不理會也沒關係但是用起來就是覺得很礙眼
其實只要做一點小設定就可以解決了
- 在家目錄下的這個路徑(若預設沒有,則自己新增)
$HOME/.pip/pip.conf
- 在pip.conf檔案內,輸入以下設定
[list]
format=columns
- 儲存後再試一次
$pip list
顯示格式就會變成比較方便識別的樣子
- 其他關於pip的設定請參考pip documentation