python 'module' object has no attribute 'PROTOCOL_SSLv2'
PHP中文网
PHP中文网 2017-04-17 17:40:27
0
2
886

我的python版本是python2.7.6 系统是ubuntu 14.04.1
进入交互式写入import ssl是不会报错的.

但是执行py文件就报一下错误了
File "/root/py/ssl.py", line 4, in <module>

'SSLv2':ssl.PROTOCOL_SSLv2,

AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv2'

所有包含有 import ssl模块的文件都报这错误,望解答!

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
伊谢尔伦

update:
I just tried it. The default SSL packaged in ubuntu 14.04 is the V3 version, so there is a compatibility issue. It may be a new version packaged by Ubuntu to solve some bugs in openssl. This is different from the current Redhat version. The series or the default version of Windows around 2.7.10 is still a little different. If you want to solve it, you need to compile the openssl v2 version into python yourself, or see if there is a compiled version of sslv2 and use it directly on windows
Version 2.7.10, Fedora 23, and Redhat 6.4 all use the SSLv2 version by default. Well, this problem is relatively hidden

左手右手慢动作

@zwillon
。。False

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!