Python Migrate commend error

Hello,
I am following step according video classes but i am facing issue at migrate database
command .
once i am typing command in terminal “python manage.py migrate” then i am getting error which are given below
(myvenv) pawangangwar@Pawans-MacBook-Air adminpanel % python manage.py migrate
Traceback (most recent call last):
File “/Users/pawangangwar/adminpanel/manage.py”, line 22, in
main()
File “/Users/pawangangwar/adminpanel/manage.py”, line 18, in main
execute_from_command_line(sys.argv)
File “/Users/pawangangwar/adminpanel/myvenv/lib/python3.9/site-packages/django/core/management/init.py”, line 446, in execute_from_command_line
utility.execute()
File “/Users/pawangangwar/adminpanel/myvenv/lib/python3.9/site-packages/django/core/management/init.py”, line 386, in execute
settings.INSTALLED_APPS
File “/Users/pawangangwar/adminpanel/myvenv/lib/python3.9/site-packages/django/conf/init.py”, line 87, in getattr
self._setup(name)
File “/Users/pawangangwar/adminpanel/myvenv/lib/python3.9/site-packages/django/conf/init.py”, line 74, in _setup
self._wrapped = Settings(settings_module)
File “/Users/pawangangwar/adminpanel/myvenv/lib/python3.9/site-packages/django/conf/init.py”, line 183, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 846, in exec_module
File “”, line 983, in get_code
File “”, line 913, in source_to_code
File “”, line 228, in _call_with_frames_removed
File “/Users/pawangangwar/adminpanel/project/settings.py”, line 42
MIDDLEWARE = [
^
SyntaxError: invalid syntax
NOTE : I am using macOS so kindly support me solve this issue
Thanks