栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

Python告警处理

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Python告警处理

Issue A

=== pip list 告警 ===

root@pts/3 $ pip listDEPRECATION: 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.
Fix A
root@pts/3 $ cat /root/.pip/pip.conf
[list]
format=columns

Issue B

=== ** SNIMissingWarning / InsecurePlatformWarning** ===

root@pts/2 $ pip install xlrd
Collecting xlrd
/usr/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Fix B
pip install pyopenssl

Issue C

=== ** fatal error: pyconfig.h: No such file or directory** ===

    creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
    build/temp.linux-x86_64-2.7/_openssl.c:12:24: fatal error: pyconfig.h: No such file or directory     #  include 
                            ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
Fix C
yum install -y python-devel

Issue D
   File "/usr/local/python27/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1119, in build_and_install
      self.run_setup(setup_script, setup_base, args)
    File "/usr/local/python27/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1107, in run_setup      raise DistutilsError("Setup script exited with %s" % (v.args[0],))
  distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed cleaning build dir for cryptography
Fix D
## make sure had installed gcc and gcc-c++yum install gcc gcc-c++## then install libffi-develpip install libffi-devel



作者:全栈运维
链接:https://www.jianshu.com/p/43b2869797d5

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/222724.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号