我加入項目,所以我想成立environnment,所以我所做的是:蟒蛇/ Django的 - 「不能用的ImageField因爲枕頭未安裝」
pip install -r requirements.txt
這完全安裝的所有要求包括django 1.7.0,Pillow 2.4.0和其他一些。
然後我想建立數據庫:
python manage.py migrate
與繁榮,錯誤,我得到如下:
CommandError: System check identified some issues:
ERRORS:
stu.chan.icon: (fields.E210) Cannot use ImageField because Pillow is not installed.
HINT: Get Pillow at https://pypi.python.org/pypi/Pillow or run command "pip install pillow".
stu.chan.image: (fields.E210) Cannot use ImageField because Pillow is not installed.
HINT: Get Pillow at https://pypi.python.org/pypi/Pillow or run command "pip install pillow".
stu.Piec.icon: (fields.E210) Cannot use ImageField because Pillow is not installed.
HINT: Get Pillow at https://pypi.python.org/pypi/Pillow or run command "pip install pillow".
...就像我沒有安裝枕頭。 所以我檢查了安裝的軟件包(使用this技術),並安裝了Pillow 2.4.0
。
然後,我還試圖強迫重新安裝:pip install --upgrade --force-reinstall Pillow==2.4.0
但是,沒有運行migrate
時候做,我得到了同樣的錯誤。
我在Mac OS X 10.6.7包裹在virtualenv 1.11.6
與PIP使用python 3.4.0
和django 1.7.0
降級到pip 1.2.1
(因爲一些知名尚未未完全解決的,也不是理解的點子與和issue SSL)。
以上所有代碼都在virtualenv(bin/activate
done)之內。
你對這個問題的原因以及如何解決它有什麼想法嗎?
- - - - - - 編輯 - - - - - -
當我運行上面的力重新安裝命令,(這麼多的代碼被outpouted我不能粘貼均可)雖然與 「成功安裝枕頭」 結束,有一個在代碼中的一些警告:
building 'PIL._imaging' extension
(blabla code)
_imaging.c:975:13: warning: array index of '1' indexes past the end of an array (that contains 1 elements) [-Warray-bounds]
value = PyTuple_GET_ITEM(xy, 1);
^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/python3.4m/tupleobject.h:58:34: note: instantiated from:
#define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
^
/usr/local/include/python3.4m/tupleobject.h:27:5: note: array 'ob_item' declared here
PyObject *ob_item[1];
^
1 warning generated.
(blabla code)
libImaging/Unpack.c:867:1: warning: unused function 'copy3' [-Wunused-function]
copy3(UINT8* out, const UINT8* in, int pixels)
^
1 warning generated.
安裝枕頭時出現任何錯誤..? – 2014-09-04 11:47:04
我更新了問題。請在安裝過程中查看警告。 – lapin 2014-09-04 13:20:21
使用'sudo'沒有警告? – 2014-09-04 13:28:48