總目錄
二、框架版本與相關工具
1 版本
python: 3.6.5
Django: 2.2.11 (有些地方我也會對比下各種版本的區別)
安裝方法
pip3 install Django==2.2.11
一般來講,2.1和2.2使用部分沒有什麼太大差別。
不過如果你的Django版本比較低的話,建議升級到2.2.11
升級方法:
pip3 install --upgrade Django==2.2.11
補充說明: 安裝過程中下載可能十分緩慢,甚至由此導致安裝失敗 此時建議大家嘗試使用鏡像下載
—國內源—
清華: https://pypi.tuna.tsinghua.edu.cn/simple
阿里雲: http://mirrors.aliyun.com/pypi/simple/
中國科技大學: https://pypi.mirrors.ustc.edu.cn/simple/
華中理工大學: http://pypi.hustunique.com/
山東理工大學: http://pypi.sdutlinux.org/
豆瓣: http://pypi.douban.com/simple/
使用辦法
pip install xxxx -i jinxiang_url
其中jinxiang_url是上面提供的鏡像url,選擇一個用就好,這裏選擇第一個,則如下
pip install xxxx -i https://pypi.tuna.tsinghua.edu.cn/simple
具體到Django安裝,則是:
pip3 install Django==2.2.11 -i https://pypi.tuna.tsinghua.edu.cn/simple
升級方法同理:
pip3 install --upgrade Django==2.2.11 -i https://pypi.tuna.tsinghua.edu.cn/simple
2 其他庫
如果使用mysql作爲數據庫的話,
需要安裝第三方庫mysqlclient
安裝方法
pip install mysqlclient
ps: Django requires mysqlclient 1.3.13 or later.
3 其他工具
IDE推薦:Pycharm(首選),sublime text
數據庫:
如果使用的默認設置sqlite3,查看db.sqlite3推薦可視化工具:DB Browser for SQLite
如果使用的mysql,可視化工具推薦:Navicat
其他:歡迎評論補充~