网站开发(周一):项目开发环境

前言:网站开发教程是在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程序。

至此,博客网站开发环境搭建完毕!

接下来,正式进入博客网站开发环节。

原文地址:https://www.cnblogs.com/linlei1234/p/10296252.html