安装配置python3.5

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装配置python3.5相关的知识,希望对你有一定的参考价值。

安装openssl与openssl-devel包
yum -y install openssl openssl-devel


到官网下载Python3的最新版
https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz

解压Python安装包(我默认放在/root下)
cd /root
tar xzvf Python-3.5.1.tgz



进入python源代码文件夹,进入Modules文件夹,修改Setup.dist,使其支持发送https请求。
cd /root/Python-3.5.1/Modules
vim Setup.dist

# 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
修改为
# 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



编译安装,设置安装目录为/usr/local/python-3.5,以免与系统已安装的python2冲突。
./configure --prefix=/usr/local/python-3.5
make
make install


本文出自 “jiazheming” 博客,请务必保留此出处http://8888866666.blog.51cto.com/6988153/1785699

以上是关于安装配置python3.5的主要内容,如果未能解决你的问题,请参考以下文章

centos7安装python3.5并配置pyqt开发环境

1.Python3.5+Pyqt5+PyCharm+Opencv3.3+Qtdesigner开发环境配置

Pycharm+PyQt5+Python3.5开发环境配置(详细教程)

在Windows server 2008 R2上安装Python3.5

CentOS 安装python3.5

windows10安装anaconda,配置tensorflow