Error modulenotfounderror when starting Django: no module named ‘pytz’

It was a bad start. I made a mistake when I first learned Django. No module named ‘pytz’ is reported when running the file through the PY – 3 runserver command

Solution: install pytz module: PIP3 install pytz

After successful installation, enter py – 3 runserver to run successfully:

  If you want to directly run the file in pycharm, you need to add parameters

First open the edit configuration, as shown in the figure:

Add parameters as shown in the figure:

Similar Posts: