【问题标题】:django on production server(ubuntu)生产服务器上的 django (ubuntu)
【发布时间】:2012-05-29 08:21:15
【问题描述】:

我正在尝试将我的 Web 应用程序发送到生产服务器。我的设置是 django-gunicorn-nginx 遵循本教程http://ijcdigital.com/blog/django-gunicorn-and-nginx-setup/。我还没有安装主管进行检查。完美的配置设置没有问题,我得到了 Django 欢迎页面。然后我将我的应用程序加载到项目中。然后我运行gunicorn_django --bind=127.0.0.1:8001 它显示

cover.backgroundmodel: "background": To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .
cover.backgroundmodel: "tmpbg": To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .
2012-05-22 14:24:02 [15359] [INFO] Worker exiting (pid: 15359)
2012-05-23 00:54:02 [15360] [INFO] Booting worker with pid: 15360
2012-05-22 14:24:02 [15360] [INFO] Worker exiting (pid: 15360)
2012-05-23 00:54:02 [15349] [INFO] Handling signal: int
2012-05-23 00:54:02 [15349] [INFO] Shutting down: Master

但我已经成功安装了所有东西,包括 PIL 和其他图像库。有趣的是我让我的项目在我的电脑上完美运行。但我无法确定生产服务器中问题的原因。

我再次尝试安装pip install PIL 它显示像这样https://gist.github.com/2771119 为什么会这样?为什么我现在无法安装我之前在安装 django 时成功安装的 PIL。

谁能帮帮我?谢谢!

【问题讨论】:

    标签: python django ubuntu nginx


    【解决方案1】:

    安装python-dev包因为你没有python的头文件来编译PIL。

    【讨论】:

    • @Furbeenator 为什么stackoverflow显示你可以在x分钟内接受答案?那是个好时机吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-24
    • 2011-09-17
    • 2015-11-28
    • 2013-09-21
    • 2011-09-29
    • 2015-09-06
    • 2011-08-04
    相关资源
    最近更新 更多