Python3 安装疑问
? Python3安装错误 ?    487    0    0

安装错误汇总:


1、报错 ModuleNotFoundError: No module named '_ctypes'

请安装libffi-devel

#wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libffi-devel-3.0.13-18.el7.x86_64.rpm
#rpm -ivh libffi-devel-3.0.13-18.el7.x86_64.rpm

2、import _ssl错误请修改编译文件:

    1)、检查是否安装openssl-devel

    2)、编辑Modules/Setup.dist 内如下段落(大致在207行):

206 # Socket module helper for socket(2)
207 _socket socketmodule.c                                              #取消本行注释
208 
209 # Socket module helper for SSL support; you must comment out the other
210 # socket line above, and possibly edit the SSL variable:
211 SSL=/usr/local/ssl                                                  #取消本行注释
212 _ssl _ssl.c \                                                       #取消本行注释
213         -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \       #取消本行注释
214         -L$(SSL)/lib -lssl -lcrypto                                 #取消本行注释
215 


觉得不错,点个赞?
Sign in to leave a comment.
No Leanote account ? Sign up now.
0 条评论
文章目录