linux下python開發環境的安裝

 

1.準備編譯環境html

yum groupinstall 'Development Tools' yum install zlib-devel bzip2-devel  openssl-devel ncurses-devel

2.下載 Python3.5代碼包python

wget  https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
tar Jxvf  Python-3.5.0.tar.xz cd Python-3.5.0 ./configure --prefix=/usr/local/python3 make && make install

3.作軟鏈:mysql

ln -s /usr/local/python3/bin/python3.5 /usr/local/bin/python3
ln -s /usr/local/python3/bin/pip3.5 /usr/local/bin/pip

4.升級pip到最新版本:web

pip install --upgrade pip

注:--no-check-certificate 表示安裝時「不檢查證書」,不加上可能沒法安裝。sql

5.安裝requests包:django

pip install requests

6.安裝pyquery包:app

pip install pyquery

7.安裝pymysql包:ui

pip install pymysql

6.安裝djangourl

等安裝完成以後,執行python進入交互式界面,輸入import django,而後再輸入django.VERSION回車後能夠看到剛剛安裝的Django的版本號,或者直接執行下面命令:spa

python3 -c "import django; print(django.get_version())"

 

python manage.py startapp message

將項目messages移動到apps下

/www/wwwroot/default/HelloDjango/manage.py

HelloDjango\settings.py

HelloDjango\settings.py

HelloDjango\urls.py

message\views.py

 http://122.152.219.178:8000/form/

參考文章:

https://www.cnblogs.com/freeweb/p/5210167.html

https://www.cnblogs.com/feng18/p/5854912.html

https://blog.csdn.net/wangyajie_11/article/details/72844755

https://blog.csdn.net/will5451/article/details/53861092

https://blog.csdn.net/huitailang1991/article/details/56480295

https://blog.csdn.net/ll641058431/article/details/53049453

https://www.cnblogs.com/guoyunzhe/p/5777974.html

相關文章
相關標籤/搜索