Python 如何通过pip忽略警告消息
当尝试使用pip安装时,我收到以下警告消息,如何拒绝此消息Python 如何通过pip忽略警告消息,python,pip,Python,Pip,当尝试使用pip安装时,我收到以下警告消息,如何拒绝此消息 Requirement already up-to-date: pyserial in c:\python27\lib\site-packages ←[31mDEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|colum
Requirement already up-to-date: pyserial in c:\python27\lib\site-packages
←[31mDEPRECATION: 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.←[0m
代码:-
try:
import subprocess32
except ImportError:
#pip.main(["install", "subprocess32"])
try:
cmd = "C:\Python2\python.exe -m pip install subprocess32"
proc = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(output, error) = proc.communicate()
except WindowsError, e:
print "Please install subprocess32 using command \"C:\Python27\python.exe -m pip install subprocess32\""
#sys.exit(1)