发布时间:2019-09-26 07:36:40编辑:auto阅读(1807)
CentOS7默认安装了python2.7.5,当需要使用python3的时候,可以手动下载Python源码后编译安装。
下载python(https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz)解压下载好的压缩包 sudo mkdir /usr/local/python3 进入解压目录sudo ./configure --prefix=/usr/local/python3 sudo make sudo make install
CentOS 安装easy_install的方法: wget -q http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py8、CentOS安装python包管理安装工具pip的方法如下: wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz 注意:wget获取https的时候要加上:--no-check-certificate tar zvxf 1.5.5 #解压文件cd pip-1.5.5/ python3 setup.py install OK,这样就安装好pip了, 下面来安装 requests吧。 pip3 install requests
sudo yum install epel-releasesudo yum install python34
# yum install -y pcre pcre-devel # yum install -y zlib zlib-devel # yum install -y openssl openssl-devel
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz tar zxvf setuptools-0.6c11.tar.gz cd setuptools-0.6c11 python setup.py install
上一篇: Python3 字符串
下一篇: python3随笔-opencv读取图像
47754
46259
37140
34647
29238
25896
24766
19870
19433
17924
5724°
6329°
5845°
5897°
6998°
5835°
5854°
6368°
6323°
7688°