我正在做一个 Django 项目,我是 Python 新手。现在我必须设置我的亚马逊服务器(ubuntu)来运行 Django 项目。我安装了所有必要的包,我的项目正在服务器上运行,但主要问题来了。我想在服务器上存储图像,因为我需要安装PIL
它,我认为它用于处理图像文件。我安装了 PIL,我解决了一些依赖问题,安装的输出PIL
如下:
sudo pip install PIL
Downloading/unpacking PIL
Running setup.py egg_info for package PIL
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
Installing collected packages: PIL
Running setup.py install for PIL
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.7.3 (default, Apr 10 2013, 05:46:21)
[GCC 4.6.3]
--------------------------------------------------------------------
--- TKINTER support available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
To check the build, run the selftest.py script.
changing mode of /usr/local/bin/pilfile.py to 755
changing mode of /usr/local/bin/pilfont.py to 755
changing mode of /usr/local/bin/pildriver.py to 755
changing mode of /usr/local/bin/pilconvert.py to 755
changing mode of /usr/local/bin/pilprint.py to 755
Successfully installed PIL
Cleaning up...
我还创建了以下文件的符号链接:
sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib
但我仍然无法将图像存储在服务器上。一个错误来了'decoder jpeg not available'
。现在我很困惑。请帮助我摆脱这个问题。我也安装了枕头,但仍然没有成功。