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

來源:互聯網
上載者:User

標籤:django   python web架構   

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)

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.