django安装 mac_如何在Windows / Linux / Mac上安装Django

django安装 mac

In this tutorial, we’re going to see how we can install django on windows, linux or mac platform.

在本教程中,我们将了解如何在Windows,Linux或Mac平台上安装django。

First of all, open https://www.djangoproject.com/. It is the official website of django. There is a ton of good information, you can also download the django from this website. But I am not recommending to download it from there. We’ll see another way to install django easily. Particularly the tutorials in that website are great if you want to get started with django with a solid foundation. But some of the students find out these tutorials little bit confusing. So we’ll provide you tutorials that we think is most relevant to you as a beginner.

首先,打开https://www.djangoproject.com/ 。 这是django的官方网站。 有很多很好的信息,您也可以从该网站下载django。 但是我不建议从那里下载它。 我们将看到另一种轻松安装django的方法。 如果您想以扎实的基础开始使用django,那么该网站上的教程特别有用。 但是有些学生发现这些教程有些混乱。 因此,我们将为您提供最适合您的入门教程。

Now we will install django with pip instead of downloading straight from the website. pip basically allows us to take other people’s Python code and bring it into our project, so that we can use it. So django can actually be downloaded into our computer as one of these pip packages.

现在,我们将使用pip安装django,而不是直接从网站下载。 pip基本上使我们可以采用他人的Python代码并将其带入我们的项目中,以便我们可以使用它。 因此django实际上可以作为这些pip软件包之一下载到我们的计算机中。

Note: pip comes bundled automatically with Python 3. So that’s why we have to make sure that we should have Python 3 and we also need it because thats the only version that work with django 2. If you got Python 3 in your system then you also got pip installed in your system.

注意: pip会自动与Python 3捆绑在一起。因此,这就是为什么我们必须确保拥有Python 3的原因,所以我们也需要它,因为那是唯一可与django 2配合使用的版本。如果您的系统中装有Python 3,则您也已经在您的系统中安装了pip。

如何在Windows,Linux,Mac上安装Django (How to Install Django on Windows, Linux,  Mac)

1. Open terminal or command prompt

1.打开终端或命令提示符

2. Type the command below and hit enter. Make sure you have internet connection.

2.输入以下命令,然后按Enter。 确保您已连接互联网。

pip install django 

pip安装Django  

Now wait to install django in your system.

现在,等待在系统中安装django。

On other hand if you want to install a specific version of django in your system or let’s say you want to install django 2.0.2 then our command will be like:

另一方面,如果要在系统中安装特定版本的django,或者说要安装django 2.0.2,则我们的命令将类似于:

pip install django==2.0.2

点安装django == 2.0.2

If anytime you want to uninstall django from your computer then you can simply type:

如果您想随时从计算机上卸载django,则只需键入:

pip uninstall django

pip卸载django

There is no need to give any specific version of django while uninstalling it.

卸载时无需提供任何特定版本的django。

Note: If you have both versions of Python (Python 2 and 3) installed in your system then to download the latest version of django please use pip3 instead of pip. If you use pip not pip3 then it will download the compatible version for Python 2, which is django 1.11.15 currently.

注意:如果系统中同时安装了两个版本的Python( Python 2和3 ), 则要下载最新版本的django,请使用pip3而不是pip 。 如果您使用pip而不是pip3,则它将下载适用于Python 2的兼容版本,当前版本为django 1.11.15。

Let’s see screenshot of installations.

让我们看一下安装的屏幕截图。

Linux or Mac (Installation Screenshots)

Linux或Mac(安装屏幕截图)

Install Django Linux 1
Install Django Linux 2
Install Django Linux 3

In Windows (Installation Screenshots) 

在Windows中(安装屏幕截图)  

Install Django Windows 2
Install Django Windows 3
Install Django Windows 4

If you are having any problem with any step of django installation then please comment below, we’ll reply as soon as possible.

如果您对django安装的任何步骤有任何疑问,请在下面发表评论,我们将尽快答复。

翻译自: https://www.thecrazyprogrammer.com/2018/09/how-to-install-django.html

django安装 mac

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值