django 安裝報錯

安裝django的時候報錯:

Collecting django==2.0
Using cached Django-2.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-p31EaG/django/setup.py", line 32, in <module>
version = import('django').get_version()
File "django/init.py", line 1, in <module>
from django.utils.version import get_version
File "django/utils/version.py", line 61, in <module>br/>@functools.lru_cache()
AttributeError: 'module' object has no attribute 'lru_cache'

解決方法:

 pip install django==1.9

官網最新的2.0版本只支持 python 3

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章