Centos 6.6 安裝python3.6及Django1.10.5

來源:互聯網
上載者:User

標籤:figure   串連   hat   環境   cal   fse   inf   config   root   

一、安裝環境檢查一下包是否安裝 

yum install gcc 
yum install zlib-devel 
yum install make

yum install -y openssl openssl-devel

二、開始安裝python3.6

wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgztar vxf Python-3.6.1.tgzcd Python-3.6.1.tgz ./configure --prefix=/usr/local   #編譯,自訂安裝目錄,如果自定目錄不在環境變數重要,要把安裝的目錄加入到環境變數中  make && make install  #這個過程會非常慢 ln –s /usr/local/bin/python3 /usr/bin/python3  #建立軟串連

三、檢查是否安裝成功

[[email protected] ~]# python3Python 3.6.1 (default, Aug  5 2017, 23:14:39)[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linuxType "help", "copyright", "credits" or "license" for more information.>>> quit()

四、安裝Django==1.10.5

安裝完成 python3.6後應該是自動安裝了pip9.0.1所以直接安裝djangopip install django==1.10.5然後做軟串連ln -s /usr/local/bin/django-admin.py /usr/bin/django-admin

五、檢查django的命令是否能運行

[[email protected] ~]# django-admin
Type ‘django-admin help <subcommand>‘ for help on a specific subcommand.Available subcommands:[django] check compilemessages createcachetable dbshell diffsettings dumpdata flush inspectdb loaddata makemessages makemigrations migrate runserver

運行django-admin的命令查看能否出現 如下的子命令,如果沒有請 建立軟串連或者添加環境變數
1、ln -s /usr/local/bin/django-admin.py /usr/bin/django-admin

2、export PATH=$PATH:/usr/local/python3/bin‘
 

 

Centos 6.6 安裝python3.6及Django1.10.5

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.