您的位置:首页 > 编程语言 > Python开发

python3.6的pip管理器出问题 ssl模块未安装

2017-03-28 21:16 519 查看
没的办法  看到廖雪峰老师的pip那里了 结果发现pip安装Pilow出了问题 说我有ssl模块未安装

奇怪 我的openssl明明自带的啊

不清楚到底什么原因

找了一波博文

最后搜到两个有点作用的

1.安装该安装的 已经安装的可以跳过


Kali是这样的


apt-get install openssl

apt-get libssl-dev

其他的有yum仓库的

yum install openssl


yum install openssl-devel -y


2. 改下Moudles/Setup

cd  <安装路径>


vi 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


3.重新走一波节奏

./configure

make && make install

4.python3

>>>import ssl  #检测成功!


>>>


Reference:

1.http://www.cnblogs.com/yuechaotian/archive/2013/06/03/3115472.html

2.http://stackoverflow.com/questions/41098252/pip-install-require-tsl-ssl
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: