May 14, 2021 Django
Before you can install Django, the system needs to have Python's development environment installed.
If you haven't installed the Python environment, you'll need to download the Python installation package first.
1, Python download address: https://www.python.org/downloads/
2, Django download address: https://www.djangoproject.com/download/
Python installation (installed skipped)
To install Python you just need to download the python-x.x.x.msi file and click the "Next" button all the time.
To check that our python was successfully installed, you can enter python in the command window to make a query, such as the information shown in Figure 1 below.
Once installed, you need to set the Python environment variable. Right-click on the computer-attributes-advanced-environment variable-modify the system variable path, add the Python installation address, this example is using C: .
Installation instructions vary, depending on whether you install a distribution-specific package, download the latest official release, or get the latest development version.
This is the recommended way to install Django.
Linux/MAC: python -m pip install Django
Windows: py -m pip
Check the release-specific instructions to see if your platform/release provides an official Django package/installer. Packages provided by the release typically allow dependencies and supported upgrade paths to be installed automatically;
Track Django development
If you decide to use the latest development version of Django, you need to pay close attention to the development schedule and want to keep an eye out for the upcoming release notes. T his will help you master all the new features you might want to use and any changes you'll need to make to your code when you update your Django copy. ( For stable versions, any necessary changes are recorded in the release notes.) )
If you want to be able to update your Django code occasionally with the latest bug fixes and improvements, follow these instructions:
Linux/MAC: $ git clone https://github.com/django/django.git
Windows:... \> git clone https://github.com/django/django.git
This
django
in the current directory.
3. Make sure that the Python interpreter can load Django's code. T
he most convenient way is to use a virtual environment and pip.
This contributing tutorial walks through how to create a virtual environment.
4. Once the virtual environment is set up and activated, run the following commands:
Linux/MAC:$ python -m pip install -e django/
Windows: ... \> py -m pip install -e django \
This will allow Django's code to be imported
django-admin
Utility command available.
In other words, you're ready!
When you want to update a copy of Django's source code, run the command from the directory. W
hen you do this, Git downloads all the changes.
git pulldjango
For more information:
https://docs.djangoproject.com/en/3.0/topics/install/