python安装完毕后,提示找不到ssl模块的解决步骤
转载自 醇酒醉影
python安装完毕后,提示找不到ssl模块:
[root@localhost ~]# python2.7.5
Python 2.7.5 (default, Jun 3 2013, 11:08:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import ssl
Traceback (most recent call last):
File "
查看openssl安装包,发现缺少openssl-devel包
[root@localhost ~]# rpm -aq|grep openssl
openssl-0.9.8e-20.el5
openssl-0.9.8e-20.el5
[root@localhost ~]#yum安装openssl-devel
[root@localhost ~]# yum install openssl-devel -y查看安装结果
[root@localhost ~]# rpm -aq|grep openssl
openssl-0.9.8e-26.el5_9.1
openssl-0.9.8e-26.el5_9.1
openssl-devel-0.9.8e-26.el5_9.1
openssl-devel-0.9.8e-26.el5_9.1重新编译python
修改Setup文件
vi /usr/software/Python-2.7.5/Modules/Setup
修改结果如下:
Socket module helper for socket(2)
_socket socketmodule.c timemodule.c
Socket module helper for SSL support; you must comment out the other
socket line above, and possibly edit the SSL variable:
SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
重新编译
make
make install测试,已可正常使用。
[root@localhost ~]# python2.7.5
Python 2.7.5 (default, Jun 3 2013, 14:56:13)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.import ssl
python安装完毕后,提示找不到ssl模块的解决步骤的更多相关文章
- python安装完毕后,提示找不到ssl模块的解决方示
python安装完毕后,提示找不到ssl模块: [root@localhost ~]# python2.7.5 Python 2.7.5 (default, Jun 3 2013, 11:08:43) ...
- 关于Oracle安装完毕后,登录时遇到的错误的解决的方法
1 提示无监听服务 解决方法:打开Net Configuration Assistant 依照提示删除现有的监听服务,然后又一次建立一个就可以. 2 SQL Plus登陆时提示username或pas ...
- python安装OpenCV后import cv2报错解决办法
现在python安装完成后,运行pip install opencv-python安装成功后,import cv2时会失败 看到有人给出下载https://www.lfd.uci.edu/~gohlk ...
- pip命令出现了问题,提示说找不到ssl模块
Could not find a version that satisfies the requirement pygame (from versions: ) No matching distrib ...
- Java和Javac的使用时总提示找不到类模块的解决方案
1.场景: 争对网上的很多文章中javac编译与java运行的文章,有很多不明确的地方,使得在合适时发现很多坑.这里给大家作下简介. 2.Javac的使用注意: javac -d ./ ./Insta ...
- cmd 运行py脚本,提示找不到xx模块
一.在学习Django+接口自动化测试,用Jenkins做定时任务,cmd运行脚本时提示 "找不到xx模块": 1.原因:Pycharm单独运行脚本时没问题,cmd运行找不到模块. ...
- Centos7安装完毕后重启提示Initial setup of CentOS Linux 7 (core)的解决方法
问题: CentOS7安装完毕,重新开机启动后显示: Initial setup of CentOS Linux 7 (core) 1) [x] Creat user 2) [!] License i ...
- 安装 VS 2015 Update 2 + Windows SDK Tools 1.3.1 + Windows SDK 10586.212 后提示找不到 10586.0 SDK 问题的解决方法
将 Visual Studio 2015 升级到 Update 2,并安装 Windows SDK Tools 1.3.1 和 Windows SDK 10586.212 后,有可能造成原本已安装的 ...
- zip方式安装MySQL提示找不到 MSVCP120.dll的解决方法
电脑重装系统后,用zip的方式安装MySQL,在执行mysqld --initialize的时候提示 由于找不到 MSVCP120.dll,无法继续执行代码.重新安装程序可能会解决此问题. 解决的方法 ...
随机推荐
- 关于display:none 和visibility:hidden 的区别
1.占据空间 :none 隐藏后不占据空间 visibility占据空间 2.回流与渲染:none产生回流与渲染 ? 可以通过oprea中的Profiler 工具测试. 关于回流的详细介绍:http: ...
- 编译osgEarth2.8遇到gdal_vrt.h找不到的问题
在编译plugins osgearth_gdal的ReaderWriterGDAL.cpp的时候可能会遇到这个问题 gdal_vrt.h这个头文件在gdal-1.11.0\frmts\vrt目录下,从 ...
- jquery计算文本字符个数
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...
- visual studio 2015连接到MySql相关问题
vs中使用服务器资源管理器连接到MySQL没有成功.按照网上提供的解决方法,相关插件已经安装: 1.控制面板中,MySQL Connector Net 6.9.9已经安装(原安装版本为6.9.8,后升 ...
- C#做上位机软件——绘图并传输给下位机
拿到任务之后首先分成了几个部分: 1.绘图.学习了GDI+ 2.图片保存. 3.将图片转换成byte[].由于使用Socket通信,只能传输byte[]数据,所以这一步是向下位机传输的关键. 相应地, ...
- HTML5窗口间同域和跨域的通信
一丶同域下的 1.如果我们要操作iframe里面的元素,首先获取到引入的页面的window.获取iframe里面的window对象. var oIframe=getElementsByTagName( ...
- “div+css”下拉菜单
<style> html, body { margin: 0; padding: 0; } .btn-group{ font-size: 14px; position: relative; ...
- jsf初学数据表(DataTable)的绑定
来看看简单的datatable例子: faces: <h:form> <h:dataTable value="#{tableData.names}" var=&q ...
- 18.Java泛型
1.为什么需要泛型 List list1=new ArrayList(Arrays.asList(new String("string"),new Integer(20))); S ...
- [C#].NET中几种Timer的使用
这篇博客将梳理一下.NET中4个Timer类,及其用法. 1. System.Threading.Timer public Timer(TimerCallback callback, object s ...