Python Pip 使用警告

在macOS更新完pip(9.0.1)之后使用会出现如下警告:

1
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.

虽然不影响使用,但是还是要解决。方法如下:

虽然不影响使用,但是还是要解决。方法如下:

1
2
3
4
cd ~
mkdir .pip
cd .pip/
vi pip.conf

接着在 vim 编辑

1
2
[list]
format=columns

最后进行保存,

再次使用pip list,会发现效果如下。

至于 Windows 也依旧类似。

C:\Users\Administrator下建立pip文件夹,在pip下新建pip.ini

内容为:

1
2
[list]
format=columns

Comments

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×