Modnar
Modnar

Reputation: 21

How to config pip.conf for python2 and python3

When I run pip3 list, I got the message 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.. When I modified my $HOME/.pip/pip.conf and added

[list]
    --format=columns

to the pip.conf. However, I got another wrong message when I run pip2 list:

Configuration file could not be loaded.
File contains parsing errors: /data/home/user00/.pip/pip.conf
        [line  2]: '    --format=columns\n'

How should I config the pip.conf to satisfied both pip2 and pip3 to run?

Upvotes: 1

Views: 4019

Answers (2)

Vinay Kumar
Vinay Kumar

Reputation: 1307

Just upgrade your pip:

pip install --upgrade setuptools


pip install pip --upgrade

Upvotes: 0

CodeIt
CodeIt

Reputation: 3618

pip3 list error message:

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.

In your config file you need to use

[list]
format=columns

or add --format=columns to pip3 list command

pip3 list --format=columns

Upvotes: 2

Related Questions