pycharm 2023.2.2 how to install older version like django 4.0

i try follow tutorial name "Becoming an Enterprise Django Developer" i have django 4.2.X. But tutorials need python 3.9, django 4.0. We know versions is very sensitive. i try install it by commands like "py -m pip install django ~=4.0.0" its works and fine install everything. But when i start in pycharm and hit runserver get errors where I can´t fix, can you try it? just with django 4.0 and python 3.9 and run it.


Hi, I successfully installed Django 4.0.0. for Python 3.9 and can start the dev server in PyCharm. If you could provide the errors you see, and the console output, I will try to help.


Thanks for support.

Its working I follow yours email support. And work fine.: That is I try it. of course I add more in requirements.txt. And Thanks. 

py -m venv env


py -m pip install Django~=4.0.0

py -m pip install --upgrade pip

django-admin startproject test 

py -m pip freeze > requirements.txt

pip install -r requirements.txt

py runserver 8000


But Pycharm Django Configurations  is tricky.