Centos7 安装部署 Python-3.6.1
来源:互联网 发布:修复linux grub引导 编辑:程序博客网 时间:2024/05/22 08:26
新安装的centos7中没有Python3环境 本来准备用yum安装的省时省力,发现yum默认的源里面Python3比较老,所以准备源码安装。
在官网下载包以后,编译安装,本来觉得应该很顺利,安装下来发现还是有些依赖库,为以后避免重复入坑,特此记录下。
环境:
$ uname -aLinux bogon 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)
首先下载最新版Python源码,执行:
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
$ ./configure$ make$ sudo make install
make的时候报错:
zipimport.ZipImportError: can't decompress data; zlib not availablemake: *** [install] Error 1
处理方式 安装zlib:
sudo yum install -y zlib*
继续编译安装完成,可以看到 pip 也一起安装了
但是在执行pip3 install 的时候报错:
sudo pip3 install beautifulsoup4pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.Collecting beautifulsoup4 Could not fetch URL https://pypi.python.org/simple/beautifulsoup4/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping Could not find a version that satisfies the requirement beautifulsoup4 (from versions: )No matching distribution found for beautifulsoup4提示找不到ssl模块,查看openssl安装包,发现缺少openssl-devel包
$rpm -aq|grep openssl
sudo yum install openssl
重新编译 Python-3.6.1.
再执行
$sudo pip3 install beautifulsoup4[sudo] password for ***: Collecting beautifulsoup4 Downloading beautifulsoup4-4.6.0-py3-none-any.whl (86kB) 100% |████████████████████████████████| 92kB 220kB/s Installing collected packages: beautifulsoup4Successfully installed beautifulsoup4-4.6.0
安装成功.
Done.
阅读全文
0 0
- Centos7 安装部署 Python-3.6.1
- centos7.1安装部署Hadoop
- Centos7下Hive-1.2.1安装部署
- centos7 安装部署redis-3.2.1
- CENTOS7安装部署ORACLE11G
- SuperSet CentOs7安装部署
- CentOS7安装部署Docker
- Centos7 Gogs服务安装部署
- centos7安装部署gitlab服务器
- CentOS7安装部署MySql5.7.15
- centos7+tomcat+cmdbuild安装部署
- CentOS7.3安装部署wordpress
- CentOS7 Tomcat JSP 安装部署
- CentOS7安装部署PostgresSQL9.6
- centos7安装python-pip
- centos7 安装python pip
- centos7安装python-pip
- centos7安装python-pip
- Python获取字典dict中不存在的值时出错
- FileReader与FileWriter
- 用js写的简洁笔记本(便于查看代码和运行结果 )
- vue-router进阶数据获取
- CSS样式
- Centos7 安装部署 Python-3.6.1
- source insight使用技巧
- 内存字节对齐
- Dubbo系列-1.概览
- SpringBoot初始教程之Redis集中式Session管理(四)
- 要求:将125万数据的兑换码,分25列,一列5万数据提取出来
- python 将字典的键&值从byte类型转换为str类型
- C# yield
- PSPNT3.0打开彩色图输出C、M、Y、K四色图