django-admin.py startproject gives "AttributeError: 'module' object has no attribute 'lru_cache'"
Mar 17, 2019 asked by anonymous
subscribe to mailing list:
Question / Issue:
When running "django-admin.py startproject project_name", I get the following error: Traceback (most recent call last): File "/path/django/django/bin/django-admin.py", line 2, in <module> from django.core import management File "/path/django/django/__init__.py", line 1, in <module> from django.utils.version import get_version File "/path/django/django/utils/version.py", line 71, in <module> @functools.lru_cache() AttributeError: 'module' object has no attribute 'lru_cache'
Date: March 17, 2019
Author: Mind Chasers
If you look at the first line of django-admin.py, you'll see: #!/usr/bin/env python Therefore, you're probably not running the python you want. You may even be running python2 depending on your OS / environment. Try doing the following from your shell: $ python3 django-admin.py startproject project_name