枕头灌注领域与python3.2 django1.8

时间:2015-07-23 00:59:09

标签: python django pip pillow

我正在使用django项目,现在我想添加一个图像字段,django让我用命令“pip install Pillow”安装Pillow, 问题是当我运行这个命令时,这个也是“sudo install Pillow”我得到的消息:

gcc: error: build/temp.linux-x86_64-3.2/libImaging/BoxBlur.o: No such file or directory

error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python3.2 -c "import setuptools, tokenize;__file__='/tmp/pip-build-otvko5/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5430vf-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-otvko5/Pillow

我已尝试过在互联网上找到的所有方法以及安装Pillow的其他方法,例如easy_install,但每次我遇到新问题。

2 个答案:

答案 0 :(得分:2)

尝试在linux中运行以下命令

sudo apt-get update 
sudo apt-get install python-dev
sudo apt-get install libevent-dev

答案 1 :(得分:0)

试试这个:

sudo apt-get install python-pil