python3.7.2 install some of the problems encountered in django

Some of the problems encountered when creating the project django:

Create mysite project:

django-admin startproject mysite

 

Error message:

pkg_resources.DistributionNotFound: The 'sqlparse' distribution was not found and is required by Django

 

The reason is the lack of sqlparse module

Solution: pip3 install sqlparse

 

Error message:

django 2.2.4 requires pytz, which is not installed.

 

Tip django2.2.4 need to provide pytz module

Solution:

pip3 install pytz

 

After installing two modules after the implementation of the project to create a command error does not occur again

django-admin startproject mysite

 

The role of the project directory file:

(djenv) [root @ root] # cd mysite /
(djenv) [root @ root mysite] # Tree.
.
├── manage.py # for project management
└── mysite # project configuration directory
├── __init__.py # py2 necessary files, directories become package
├── settings.py # project configuration file
├── urls.py # routing system files, program entry
└── wsgi.py # for publishing projects

Guess you like

Origin www.cnblogs.com/shixi-study/p/11332891.html