1

我正在尝试将我的 Web 应用程序发送到生产服务器。按照本教程http://ijcdigital.com/blog/django-gunicorn-and-nginx-setup/ ,我的设置是django-gunicorn-nginx。我还没有安装主管进行检查。完美的配置设置没有问题,我得到了 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。

有人可以帮我吗?谢谢!

4

1 回答 1

6

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

于 2012-05-22T19:40:40.127 回答