应用程序部署:Django 未安装在服务器上 - AttributeError: 'module' 对象没有属性 'lru_cache' [英] App Deployment: Django not installing on server- AttributeError: 'module' object has no attribute 'lru_cache'

查看:23
本文介绍了应用程序部署:Django 未安装在服务器上 - AttributeError: 'module' 对象没有属性 'lru_cache'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试部署 Django 应用程序,但出于某种原因,我不断收到此错误.在我看来,Django 未安装,但在安装时也会出错.感谢您对此的帮助.我正在 Amazon EC2 上部署

I am trying to deploy a Django App and for some reason, I keep getting this error. It seems to me that Django is not installed but it also errors when installing. Thank you for the help on this. I am deploying on Amazon EC2

(venv) ubuntu@ip----:~/quotes$ pip install Django
Collecting Django
  Using cached Django-2.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-build-ceP6se/Django/setup.py", line 32, in 
        version = __import__('django').get_version()
      File "django/__init__.py", line 1, in 
        from django.utils.version import get_version
      File "django/utils/version.py", line 61, in 
        @functools.lru_cache()
    AttributeError: 'module' object has no attribute 'lru_cache'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ceP6se/Django/

中失败,错误代码为 1

推荐答案

Django 已停止支持 Python 2 版本,您仍然可以尝试使用以下代码安装 1.11 版本.

Django has stopped its support for Python 2 version, still you can try installing 1.11 version by using the below code.

pip install Django==1.11

这篇关于应用程序部署:Django 未安装在服务器上 - AttributeError: 'module' 对象没有属性 'lru_cache'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆