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 相关文章推荐
Tensorflow之Saver的用法详解
Apr 23 Python
python获取当前目录路径和上级路径的实例
Apr 26 Python
Python生成器定义与简单用法实例分析
Apr 30 Python
Python装饰器知识点补充
May 28 Python
Python中shapefile转换geojson的示例
Jan 03 Python
python3 打印输出字典中特定的某个key的方法示例
Jul 06 Python
Python Sympy计算梯度、散度和旋度的实例
Dec 06 Python
python之MSE、MAE、RMSE的使用
Feb 24 Python
基于Python计算圆周率pi代码实例
Mar 25 Python
使用jupyter notebook直接打开.md格式的文件
Apr 10 Python
带你学习Python如何实现回归树模型
Jul 16 Python
python使用BeautifulSoup 解析HTML
Apr 24 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 字符串操作入门教程
2006/12/06 PHP
php对csv文件的读取,写入,输出下载操作详解
2013/08/10 PHP
php使用gzip压缩传输js和css文件的方法
2015/07/29 PHP
PHP中Array相关函数简介
2016/07/03 PHP
PHP 极验验证码实例讲解
2016/09/29 PHP
在laravel中实现ORM模型使用第二个数据库设置
2019/10/24 PHP
JS打开新窗口的2种方式
2013/04/18 Javascript
如何让DIV可编辑、可拖动示例代码
2013/09/18 Javascript
jquery.autocomplete修改实现键盘上下键自动填充示例
2013/11/19 Javascript
自定义jquery模态窗口插件无法在顶层窗口显示问题
2014/05/29 Javascript
使用JavaScript 编写简单计算器
2014/11/24 Javascript
Javascript前端UI框架Kit使用指南之kitjs事件管理
2014/11/28 Javascript
jquery图片切换插件
2015/03/16 Javascript
jquery插件NProgress.js制作网页加载进度条
2015/06/05 Javascript
js实现的页面加载完毕之前loading提示效果完整示例【附demo源码下载】
2016/08/02 Javascript
javascript实现页面滚屏效果
2017/01/17 Javascript
非常实用的vue导航钩子
2017/03/20 Javascript
JS中cookie的使用及缺点讲解
2017/05/13 Javascript
vue2.0s中eventBus实现兄弟组件通信的示例代码
2017/10/25 Javascript
ES6扩展运算符用法实例分析
2017/10/31 Javascript
jquery在启动页面时,自动加载数据的实例
2018/01/22 jQuery
浅谈React碰到v-if
2018/11/04 Javascript
Javascript实现时间倒计时功能
2018/11/17 Javascript
前端vue+elementUI如何实现记住密码功能
2020/09/20 Javascript
JS如何生成动态列表
2020/09/22 Javascript
[00:35]2016完美“圣”典风云人物:冷冷宣传片
2016/12/08 DOTA
Python生成随机数的方法
2014/01/14 Python
简单解析Django框架中的表单验证
2015/07/17 Python
wxPython实现窗口用图片做背景
2018/04/25 Python
关于html字符串正则判断和匹配的具体使用
2019/12/12 HTML / CSS
马来西亚航空官方网站:Malaysia Airlines
2017/07/28 全球购物
小学生开学第一课活动方案
2014/03/27 职场文书
个人作风建设自查报告
2014/10/22 职场文书
民间借贷被告代理词
2015/05/23 职场文书
反腐倡廉心得体会2016
2016/01/13 职场文书
Mysql文件存储图文详解
2021/06/01 MySQL