python之路-----搭建django框架

1、在yaolansvr 192.168.0.3上安装Python-3.4.3.tar.xz
使用Xmanager5的Xftp5将文件上传到ftp目录

2、安装源码的python
注意:
(1)Ignoring ensurepip failure: pip 6.0.8 requires SSL/TLS
解决:需要安装yum -y install openssl-devel.x86_64
# yum list all|grep glibc
glibc.x86_64                              2.12-1.149.el6                   @base
glibc-common.x86_64                       2.12-1.149.el6                   @base
glibc-devel.x86_64                        2.12-1.149.el6                   @base
glibc-headers.x86_64                      2.12-1.149.el6                   @base
compat-glibc.x86_64                       1:2.5-46.2                       base 
compat-glibc-headers.x86_64               1:2.5-46.2                       base 
glibc.i686                                2.12-1.47.el6                    base 
glibc-devel.i686                          2.12-1.47.el6                    base 
glibc-static.i686                         2.12-1.47.el6                    base 
glibc-static.x86_64                       2.12-1.47.el6                    base 
glibc-utils.x86_64                        2.12-1.47.el6                    base 
# rpm -qa|grep glibc
glibc-common-2.12-1.149.el6.x86_64
glibc-2.12-1.149.el6.x86_64
glibc-headers-2.12-1.149.el6.x86_64
glibc-devel-2.12-1.149.el6.x86_64
# yum list all|grep openssl
openssl.x86_64                            1.0.1e-30.el6                    @base
krb5-pkinit-openssl.x86_64                1.9-22.el6                       base 
openssl.i686                              1.0.0-20.el6                     base 
openssl-devel.i686                        1.0.0-20.el6                     base 
openssl-devel.x86_64                      1.0.0-20.el6                     base 
openssl-perl.x86_64                       1.0.0-20.el6                     base 
openssl-static.x86_64                     1.0.0-20.el6                     base 
openssl098e.i686                          0.9.8e-17.el6.centos             base 
openssl098e.x86_64                        0.9.8e-17.el6.centos             base 
# rpm -qa|grep openssl
openssl-1.0.1e-30.el6.x86_64
(2)make install错误
make可以,而make install不行,是因为make一般指进行源码的编译和链接,生成可执行文件,make install是将编译好的程序复制到实现部署的目录结构中;
解决:如果安装的时候指定了prefix,直接删除就好。如果没有,并且源代码没有提供make uninstall/distclean/veryclean的功能,一般这样做:找一个临时目录重新安装一遍。
比如./configure --prefix=/tmp/to_remove && make install然后遍历/tmp/to_remove里的文件,把你原来安装位置的文件都删除。

mount /dev/cdrom /mnt
yum makecache --disablerepo=epel ##最好修改.repo文件关闭
yum install readline-devel -y
yum -y install xz.x86_64 
cd /yangsq/ftp/
xz -d Python-3.4.3.tar.xz

tar xvf Python-3.4.3.tar

yum -y install openssl-devel.x86_64 ##pip必须需要这个依赖包,2.x不需要

./configure --prefix=/usr/local/python3.4.3  ##Makefile在这个步骤创建
make&&make install
Successfully installed pip-6.0.8 setuptools-12.0.5

ln -sv /usr/local/python3.4.3/bin/python3.4 /usr/bin/python3.4

3、使用pip安装django(Installing an official release with pip)
/usr/local/python3.4.3/bin/pip3.4 install django
Successfully installed django-1.8.3

4、验证是否成功安装django
pwd
/usr/local/python3.4.3/bin

ll *django*
-rwxr-xr-x. 1 root root 286 8月  18 17:11 django-admin
-rwxr-xr-x. 1 root root 145 8月  18 17:11 django-admin.py

python3.4
>>> import django
>>> django.VERSION
(1, 8, 3, 'final', 0)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值