前言:網站開發教程是在MacBook Pro-macOS Mojave 10.14.2操作系統下,使用Python語言和DjangoMVC架構,開發工具為PyCharm Professional Edition 2018.3,后台服務器為Nginx、Uwsgi、SQLite3,另外,引入Pip、virtualenv等第三方工具。
第一、安裝最新版本Python
Python is a great object-oriented, interpreted, and interactive programming language. It is often compared (favorably of course :-) ) to Lisp, Tcl, Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's much more fun.
Python是一種出色的面向對象,解釋和交互式編程語言。 它經常與Lisp,Tcl,Perl,Ruby,C#,Visual Basic,Visual Fox Pro,Scheme或Java進行比較(當然有利於:-)),而且它更有趣。
1、選擇適合自己設備的Python版本

2、下載並安裝,一直Enter


3、雙擊IDLE,打開Shell界面


第二、安裝PyCharm 專業版
PyCharm is an integrated development environment (IDE) used in computer programming, specifically for the python language. It is developed by the Czech company JetBrains.[2] It provides code analysis, a graphical debugger,an integrated unit tester, integration with version control systems (VCSes), and supports web development with Django.
PyCharm是一個用於計算機編程的集成開發環境(IDE),專門用於Python語言。 它由捷克公司JetBrains開發。[2] 它提供代碼分析,圖形調試器,集成單元測試器,與版本控制系統(VCSes)的集成,並支持使用Django進行Web開發。PyCharm是跨平台的,具有Windows,macOS和Linux版本。 Community Edition是在Apache License [3]下發布的,還有專業版,具有額外功能,在專有許可下發布。
1、下載適合自己設備的PyCharm專業開發版本

2、Enter直到安裝完成

3、雙擊打開,彈出注冊頁面,將注冊碼復制填入


4、下載漢化包(驗證碼:wzdt)

打開本地PyCharm安裝路徑,顯示包內容,找到lib文件夾並刪除里面的 resources_en.jar,把下載好的中文語言包拷貝到lib文件夾里。
5、重新打開Pycharm專業版,漢化版界面

第三、安裝pip
Pip is a modern, universal Python package management tool. Provides the ability to find, download, install, anduninstall Python third-party packages.
Pip 是一個現代的,通用的 Python 包管理工具。提供了對 Python 第三方包的查找、下載、安裝、卸載的功能。
1、到pip官網,復制下載鏈接

2、打開CMD界面, 輸入命令安裝pip

第四、用pip安裝Django
Django is an open source web application framework written in Python. The framework mode of MVC is adopted, namely model M, view V and controller C. It was originally developed to manage some of the news content-based websites of the Lawrence Publishing Group, namely CMS (Content Management System) software. It was released under the BSD license in July 2005. The frame is named after the Gypsy jazz guitarist Django Reinhardt of Belgium.
Django是一個開放源代碼的Web應用框架,由Python寫成。采用了MVC的框架模式,即模型M,視圖V和控制器C。它最初是被開發來用於管理勞倫斯出版集團旗下的一些以新聞內容為主的網站的,即是CMS(內容管理系統)軟件。並於2005年7月在BSD許可證下發布。這套框架是以比利時的吉普賽爵士吉他手Django Reinhardt來命名的。
1、用Python的第三方包安裝工具pip,安裝Django開發框架(系統級別)

第五、用pip安裝開發需要的虛擬環境virtualenv
virtualenv is a tool used to create an isolated workspace for a Python application. It has various advantages such as the ability to install modules locally, export a working environment, and execute a Python program in that environment.
virtualenv是一個用於為Python應用程序創建獨立工作空間的工具。 它具有各種優點,例如能夠在本地安裝模塊,導出工作環境以及在該環境中執行Python程序。

至此,博客網站開發環境搭建完畢!
接下來,正式進入博客網站開發環節。





