python

pip.confが作られていない

pip3を実行したらなぜかこんなメッセージが、、、

[postgres@vm022 ~]$ pip3 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.
blivet (3.4.0)
Brlapi (0.6.7)
chardet (3.0.4)

調べてみると、単純に解消するだけなら、 pip3 list –format=columns でも良いみたいですが、ユーザホームDir.の配下にpip.confを作成しないといけないようです。

[postgres@vm022 ~]$ mkdir -p ~/.pip

[postgres@vm022 ~]$ vi ./.pip/pip.conf
--  以下pip.confの内容を記載する
--

-- 再度実行するとメッセージはでなくなりました。
--
[postgres@vm022 ~]$ pip3 list
Package             Version
------------------- -----------
blivet              3.4.0
Brlapi              0.6.7
pip.conf の記載内容
[global]
index-url = https://pypi.org/simple/
trusted-host = pypi.org
              pypi.python.org
              files.pythonhosted.org

[list]
format = columns
スポンサーリンク
タイトルとURLをコピーしました