2012-05-22 114 views
1

我试图将我的web应用程序发送到生产服务器。按照本教程http://ijcdigital.com/blog/django-gunicorn-and-nginx-setup/,我的设置是django-gunicorn-nginx。我还没有安装主管的检查目的。在完美的配置设置中没有问题,我得到了Django的欢迎页面。然后我将我的应用程序加载到项目中。然后我跑gunicorn_django --bind=127.0.0.1:8001这表明生产服务器上的django(ubuntu)

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为什么会这样?为什么我现在无法安装PIL,现在我在安装Django之前成功安装了PIL。

任何人都可以帮助我吗?谢谢!

回答

6

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

+0

谢谢!它正在工作:) – rnk

+0

@rnk,请接受答案。 – Furbeenator

+0

@Furbeenator为什么stackoverflow显示**您可以接受x分钟**的答案?这是一段美好的时光吗? – rnk