(newDjango) C:\Python34\Scripts\newDjango>C:\Python34\Scripts\newDjango\Scripts\django-admin.exe startproject newDjango .
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python34\Scripts\newDjango\Scripts\django-admin.exe\__main__.py", line 5, in <module>
File "c:\python34\scripts\newdjango\lib\site-packages\django\core\management\__init__.py", line 11, in <module>
from django.conf import settings
File "c:\python34\scripts\newdjango\lib\site-packages\django\conf\__init__.py", line 18, in <module>
from django.utils.functional import LazyObject, empty
File "c:\python34\scripts\newdjango\lib\site-packages\django\utils\functional.py", line 12
return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs})
^
SyntaxError: invalid syntax
If you are using python 3.4, then make sure you have Django 2.0 installed. With python 3.4, Django 2.1x throws the above error.
Run the command to install django:
pip3 install Django==2.0.0
Verify the version:
$ python -m django --version
2.0
$ python -V
Python 3.4.0
This should resolve your issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With