安装django时出现 'module' object has no attribute 'lru_cache'怎么解决

这篇文章主要介绍“安装django时出现 'module' object has no attribute 'lru_cache'怎么解决”,在日常操作中,相信很多人在安装django时出现 'module' object has no attribute 'lru_cache'怎么解决问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”安装django时出现 'module' object has no attribute 'lru_cache'怎么解决”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

pip install django  
InsecurePlatformWarning
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 "/private/var/folders/m5/4nkdth017wd93klt4ph81k640000gn/T/pip-build-YwlQXr/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>@functools.lru_cache()<br/" rel="nofollow">br/>@functools.lru_cache()<br/AttributeError: 'module' object has no attribute 'lru_cache'

    不知道什么原因  可能是版本问题 
    sudo pip install Django==1.10.6  后正常

到此,关于“安装django时出现 'module' object has no attribute 'lru_cache'怎么解决”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注网站,小编会继续努力为大家带来更多实用的文章!