pip安装py_zipkin时提示的SSL问题对应


Posted in Python onDecember 29, 2018

python的应用实践zipkin,需要py_zipkin,使用pip进行安装py_zipkin的时候出现问题, 根据stackoverflow的信息设定了pypi.org 和 files.pythonhosted.org解决了问题。

问题现象

[root@kong ~]# pip install py_zipkin
Collecting py_zipkin
 Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)'),)': /packages/ef/87/e8fc3f124d491e635023a71f256769691037fc1451e5f5fb73846d6322d8/py_zipkin-0.11.0-py2.py3-none-any.whl
...省略
 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)'),)': /packages/ef/87/e8fc3f124d491e635023a71f256769691037fc1451e5f5fb73846d6322d8/py_zipkin-0.11.0-py2.py3-none-any.whl
Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/ef/87/e8fc3f124d491e635023a71f256769691037fc1451e5f5fb73846d6322d8/py_zipkin-0.11.0-py2.py3-none-any.whl (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)'),))
[root@kong ~]#

安装命令

pip install ?trusted-host pypi.org ?trusted-host files.pythonhosted.org py-zipkin

出现问题,需要安装python-devel,在ubuntu等上名为python-dev

[root@kong ~]# pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org py-zipkin
Collecting py-zipkin
 Downloading https://files.pythonhosted.org/packages/ef/87/e8fc3f124d491e635023a71f256769691037fc1451e5f5fb73846d6322d8/py_zipkin-0.11.0-py2.py3-none-any.whl
Collecting thriftpy (from py-zipkin)
...省略
 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 thriftpy/transport/cybase.c -o build/temp.linux-x86_64-2.7/thriftpy/transport/cybase.o
 thriftpy/transport/cybase.c:13:20: fatal error: Python.h: No such file or directory
  #include "Python.h"

安装日志

再次执行,安装成功

[root@kong ~]# pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org py-zipkin
Collecting py-zipkin
 Downloading https://files.pythonhosted.org/packages/ef/87/e8fc3f124d491e635023a71f256769691037fc1451e5f5fb73846d6322d8/py_zipkin-0.11.0-py2.py3-none-any.whl
Requirement already satisfied: six in /usr/lib/python2.7/site-packages (from py-zipkin) (1.11.0)
Collecting thriftpy (from py-zipkin)
 Downloading https://files.pythonhosted.org/packages/f4/19/cca118cf7d2087310dbc8bd70dc7df0c1320f2652873a93d06d7ba356d4a/thriftpy-0.3.9.tar.gz (208kB)
  100% |################################| 215kB 2.0MB/s 
Requirement already satisfied: ply<4.0,>=3.4 in /usr/lib/python2.7/site-packages (from thriftpy->py-zipkin) (3.11)
Building wheels for collected packages: thriftpy
 Running setup.py bdist_wheel for thriftpy ... done
 Stored in directory: /root/.cache/pip/wheels/64/ff/0b/00a7ab5df78f8360908e34744eb78c2c537a327a295da5c260
Successfully built thriftpy
Installing collected packages: thriftpy, py-zipkin
Successfully installed py-zipkin-0.11.0 thriftpy-0.3.9
[root@kong ~]#

参考文档

https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed-certi

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对三水点靠木的支持。如果你想了解更多相关内容请查看下面相关链接

Python 相关文章推荐
python获取本机外网ip的方法
Apr 15 Python
Python 描述符(Descriptor)入门
Nov 20 Python
numpy返回array中元素的index方法
Jun 27 Python
python绘制散点图并标记序号的方法
Dec 11 Python
Python英文文本分词(无空格)模块wordninja的使用实例
Feb 20 Python
python 遗传算法求函数极值的实现代码
Feb 11 Python
python使用python-pptx删除ppt某页实例
Feb 14 Python
Python3打包exe代码2种方法实例解析
Feb 17 Python
Python sql注入 过滤字符串的非法字符实例
Apr 03 Python
Python变量及数据类型用法原理汇总
Aug 06 Python
Python 通过爬虫实现GitHub网页的模拟登录的示例代码
Aug 17 Python
如何用python插入独创性声明
Mar 31 Python
Python 做曲线拟合和求积分的方法
Dec 29 #Python
python 画三维图像 曲面图和散点图的示例
Dec 29 #Python
python实现三维拟合的方法
Dec 29 #Python
Django数据库连接丢失问题的解决方法
Dec 29 #Python
Python Cookie 读取和保存方法
Dec 28 #Python
Python编程flask使用页面模版的方法
Dec 28 #Python
Python编程中flask的简介与简单使用
Dec 28 #Python
You might like
php Xdebug的安装与使用详解
2013/06/20 PHP
php输入数据统一类实例
2015/02/23 PHP
Js+Dhtml:WEB程序员简易开发工具包(预先体验版)
2006/11/07 Javascript
超酷的网页音乐播放器DewPlayer使用方法
2010/12/18 Javascript
基于jquery打造的百分比动态色彩条插件
2012/09/19 Javascript
$.get获取一个文件的内容示例代码
2013/09/11 Javascript
一个简单的Node.js异步操作管理器分享
2014/04/29 Javascript
jQuery实现鼠标可拖动调整表格列宽度
2014/05/26 Javascript
JavaScript的9种继承实现方式归纳
2015/05/18 Javascript
json格式数据的添加,删除及排序方法
2016/01/21 Javascript
js模态对话框使用方法详解
2017/02/16 Javascript
AngularJS中$http使用的简单介绍
2017/03/17 Javascript
JavaScript输出所选择起始与结束日期的方法
2017/07/12 Javascript
基于BootStrap的文本编辑器组件Summernote
2017/10/27 Javascript
nodejs爬虫初试superagent和cheerio
2018/03/05 NodeJs
layui table数据修改的回显方法
2019/09/04 Javascript
layui的select联动实现代码
2019/09/28 Javascript
js重写alert事件(避免alert弹框标题出现网址)
2020/12/04 Javascript
[02:16]DOTA2超级联赛专访Burning 逆袭需要抓住机会
2013/06/24 DOTA
[00:36]我的中国心——Serenity vs Fnatic
2018/08/21 DOTA
Django中对数据查询结果进行排序的方法
2015/07/17 Python
Python读写Json涉及到中文的处理方法
2016/09/12 Python
Python调用C++程序的方法详解
2017/01/24 Python
python虚拟环境的安装配置图文教程
2017/10/20 Python
Python中按值来获取指定的键
2019/03/04 Python
python中的&amp;&amp;及||的实现示例
2019/08/07 Python
简单了解Python3 bytes和str类型的区别和联系
2019/12/19 Python
Python lxml模块的基本使用方法分析
2019/12/21 Python
Python tcp传输代码实例解析
2020/03/18 Python
表单button的outline在firefox浏览器下的问题
2012/12/24 HTML / CSS
John Varvatos官方网站:设计师男士时装
2017/02/08 全球购物
美国汽车零部件和配件网站:CarParts
2019/03/13 全球购物
幼师求职自荐信范文
2014/01/26 职场文书
优秀教师先进事迹材料
2014/12/15 职场文书
肖申克的救赎观后感
2015/06/02 职场文书
python中字符串String及其常见操作指南(方法、函数)
2022/04/06 Python