安装python3
cd /src
wget https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz
mkdir -p /opt/python3
tar -zxvf Python-3.4.1.tgz
cd Python-3.4.1
./configure --prefix=/opt/python3 && make && make install
将/opt/python3/bin加入环境变量
[root@mysql3]# python3
Python 3.4.1 (default, Apr 15 2017, 14:11:11)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
|
安装setuptools
[root@mysql3 ~]# wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26
[root@mysql3 ~]# tar -zxvf setuptools-19.6.tar.gz
[root@mysql3 ~]# cd setuptools-19.6
[root@mysql3 setuptools-19.6]# python3 setup.py build
[root@mysql3 setuptools-19.6]# python3 setup.py install
... ...
creating 'dist/setuptools-19.6-py3.4.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing setuptools-19.6-py3.4.egg
Copying setuptools-19.6-py3.4.egg to /opt/python3/lib/python3.4/site-packages
Adding setuptools 19.6 to easy-install.pth file
Installing easy_install script to /opt/python3/bin
Installing easy_install-3.4 script to /opt/python3/bin
Installed /opt/python3/lib/python3.4/site-packages/setuptools-19.6-py3.4.egg
Processing dependencies for setuptools==19.6
Finished processing dependencies for setuptools==19.6
可以看到安装到python3下面了
|
安装pip (
安装pip前需要前置安装setuptools)
[root@mysql3 ~]# wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb
[root@mysql3 ~]# tar -zxvf pip-8.0.2.tar.gz
[root@mysql3 ~]# cd pip-8.0.2
[root@mysql3 pip-8.0.2]# python3 setup.py build
[root@mysql3 pip-8.0.2]# python3 setup.py install
... ...
creating 'dist/pip-8.0.2-py3.4.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pip-8.0.2-py3.4.egg
creating /opt/python3/lib/python3.4/site-packages/pip-8.0.2-py3.4.egg
Extracting pip-8.0.2-py3.4.egg to /opt/python3/lib/python3.4/site-packages
Adding pip 8.0.2 to easy-install.pth file
Installing pip3 script to /opt/python3/bin
Installing pip3.4 script to /opt/python3/bin
Installing pip script to /opt/python3/bin
Installed /opt/python3/lib/python3.4/site-packages/pip-8.0.2-py3.4.egg
Processing dependencies for pip==8.0.2
Finished processing dependencies for pip==8.0.2
|
安装Django
使用pip3安装:pip3 install Django==1.8.17或者单独下载安装:
[root@mysql3 ~]# wget https://pypi.python.org/packages/44/41/bf93934082e9897a56a591a67bacbd9fb74e71244f3f42253432a9e627e6/Django-1.8.17.tar.gz#md5=e76842cdfbcb31286bd44f51e087a04c
[root@mysql3 ~]# tar -zxvf Django-1.8.17.tar.gz
[root@mysql3 ~]# cd Django-1.8.17
[root@mysql3 Django-1.8.17]# python3 setup.py install
[root@mysql3 Django-1.8.17]# python3
Python 3.4.1 (default, Apr 15 2017, 14:11:11)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> django.VERSION
(1, 8, 17, 'final', 0)
>>> exit()
|
安装bison 2.5
bison 2.5的源码编译
代码获取: http://ftp.gnu.org/gnu/bison/bison-2.5.tar.bz2
解压缩:tar xf bison-2.5.tar.bz2
进入目录:cd bison-2.5
检查并编译源码:./configure && make && make install
其中编译问题用以下方式解决
解决编译问题: https://www.cnblogs.com/hjj801006/p/3988220.html
代码获取: http://ftp.gnu.org/gnu/bison/bison-2.5.tar.bz2
解压缩:tar xf bison-2.5.tar.bz2
进入目录:cd bison-2.5
检查并编译源码:./configure && make && make install
其中编译问题用以下方式解决
解决编译问题: https://www.cnblogs.com/hjj801006/p/3988220.html
zlib官方网站:
http://www.zlib.net
上下载源码来安装zlib软件包。
目前最新版本zlib是zlib1.2.8,
安装开始;
方法一:
$wget http://www.zlib.net/zlib-1.2.8.tar.gz$tar -xvzf zlib-1.2.8.tar.gz
$cd zlib-1.2.8.tar.gz
$./configure
$make
$make install
方法二:
直接将 URL : http://www.zlib.net/zlib-1.2.8.tar.gz
粘贴到浏览器的地址栏,即可实现下载。然后将下载得到的压缩包拷贝到你的linux机器上,进行编译安装。
网站下载:
![](https://i-blog.csdnimg.cn/blog_migrate/0729b3b942975ced4ff92a045394b0fe.jpeg)