[PYTHON] [Memorandum] What to do when a warning appears after executing pip list

The 9th series of pip has been released, and although I upgraded pip with pip install -U pip, the following warning message is output every time I hit the pip list.

[[email protected]]# pip list                                                                                                                                                               [/Users/taka.baya]
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 asked google teacher to translate it, it seems that the display format of pip list changes, so it seems that you should specify the display format in the [list] section of pip.conf.

The environment is OS X:10.12.6 python is managed by pyenv.

The location of pip.conf seems to be different depending on the OS type User Guide I found out.

According to the user guide, it seems that the pip config file is in $ HOME / Library / Application Support / pip / on OS X, so I jumped at it immediately.

[[email protected]]# cd $HOME/Library/Application Support/pip/                                                                                              [/Users/taka.baya/Library/Application Support/pip]
cd:cd:1: no such file or directory: Support/pip/ Support/pip

Apparently there is no such folder. After that, when I looked up the directory, it seems that it exists as $ HOME / Library /'Application Support'/ instead of $ HOME / Library / Application Support / on my OS X.

And since the pip directory did not exist, I created it and created pip.conf.

[[email protected]]# mkdir $HOME/Library/'Application Support'/pip/
[[email protected]]# vi pip.conf

conf.pip


[list]
format=columns

After that, I ran pip list

[[email protected]]# pip list                                                                                                                               [/Users/taka.baya/Library/Application Support/pip]
Package          Version
---------------- -------
appdirs          1.4.3

And the error disappeared.

Since I manage python with pyenv, I wondered if I should create pip.conf in /Users/taka.baya/.pyenv/shims/pip at first because I have little knowledge of programming. I couldn't make it.

Recommended Posts

[Memorandum] What to do when a warning appears after executing pip list
What to do when a warning message is displayed in pip list
What to do when a warning appears around Python integration in Neovim's CheckHealth
What to do if Insecure Platform Warning appears when running Python
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
[Go 1.13] What to do when unexpected directory layout: appears
[openpyxl] What to do when IllegalCharacterError appears in pandas.DataFrame.to_excel
What to do when gdal_merge creates a huge file
What to do if a UnicodeDecodeError occurs in pip
[AWS] What to do when you want to pip with Lambda
What to do if pip gives a DistributionError in Homebrew
What to do when a Remove Error occurs when updating conda
What to do when "SSL: CERTIFICATE_VERIFY_FAILED _ssl.c: 1056" appears in Python
OSError: [Errno 40] What to do when Message too long appears
What to do when "Invalid HTTP_HOST header" appears in Django
What to do when Ubuntu crashes
[AWS] What to do when the ping command causes a "timeout"
What to do when a video cannot be read by cv2.VideoCapture
What to do if you get a UnicodeDecodeError with pip install
What to do after installing Linux (Ubuntu)
What to do when pyinstaller: error: argument --add-binary: invalid add_data_or_binary value: appears
[Docker] What to do when error Couldn't find the binary git appears
What to do if fprintd requires a password when registering your fingerprint
[OSX] [pyenv] What to do when an SSL error occurs in pip
What to do if you get a "Wrong Python Platform" warning when using Python with the NetBeans IDE
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
Note: What to do if pip install fails
What to do when "TypeError: must be string, not int…" appears when using strptime
What to do when SSL error occurs in pip in Windows10, miniconda, VScode environment
[For beginners] What to do after installing Anaconda
What to do if scrapy doesn't work after installing scrapy with pip on mac
What to do if pip cannot be installed
What to do when "TypeError: data type not understood" appears in python's numpy.zeros
What to do when PermissionError of tempfile.mkstemp occurs
What to do when [Errno 2] No such file or directory appears in Python
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
What do you like about how to convert an array (list) to a string?
What to do when you want to receive files from a Windows client remotely
What to do if a communication error occurs due to proxy when installing with package management of pip, npm, gem
What to do if you get a memory error when converting from PySparkDataFrame to PandasDataFrame
What to do if pvcreate produces a lot of WARNING and cannot be created
[Python] What to do when No module named'pyproj.datadir' appears when Exe is done with PyInstaller
What to do when "Type Error: must be _socket.socket, not socket" appears on GAE
What to do if pip install fails in Xcode 5.1
What to do if you can't pip install mysqlclient
curl: (60) What to do when Issuer certificate is invalid.
What to do when raise ValueError, "unsupported hash type"
Things to note when initializing a list in Python
What to do when "cannot import name xxx" [Python]
A memorandum when an error occurs with pip install
What to do if pip install fails to install dependent libraries
What to do when you can't bind CaboCha to Python
What to do if you install openCV3 and make a symbolic link, but when you do "import cv2", "No module named'cv2'" appears
What to do when a Missing artifact occurs in a jar that is not defined in pom.xml
What to do if you get an Undefined error when trying to use pip with pyenv
[Django] A memorandum when you want to communicate asynchronously [Python3]
What to do when Japanese is not displayed on matplotlib
What to do when PyCharm font is strange or garbled
What to do when Unalignable boolean Series provided as indexer
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do when an error occurs with import _ssl