Since you are using the system-wide python installation you need to run pip
as superuser

sudo pip install pillow

You could also create a virtualenv instead of installing packages
system-wide, which is the recommended way of creating development
environments.

On Wed, Jan 21, 2015 at 1:53 PM, aseds <s.sami.ghay...@gmail.com> wrote:

> thank you Vijay, the error has changed. now i've got
>
> error: could not create '/usr/local/lib/python2.7/dist-packages/PIL': 
> Permission denied
>
> ----------------------------------------
> Cleaning up...
>
> Command /usr/bin/python -c "import setuptools, 
> tokenize;__file__='/tmp/pip_build_aseds/pillow/setup.py';exec(compile(getattr(tokenize,
>  'op
>
> en', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
> install --record /tmp/pip-p5GAWn-record/install-record.txt --single
>
> -version-externally-managed --compile failed with error code 1 in 
> /tmp/pip_build_aseds/pillow
> Storing debug log for failure in /home/aseds/.pip/pip.log
>
> so, should i change the Permission for "dist-packages"?? is it safe to run
> the below command?
> chmod 777 dist-packages
> or what should i do?
>
> On Wednesday, January 21, 2015 at 6:13:23 AM UTC-8, Vijay Khemlani wrote:
>>
>> You need to install the development python package for your distro
>>
>> For example, in Ubuntu
>>
>> sudo apt-get install python-dev
>>
>> in Fedora
>>
>> sudo yum install python-devel
>>
>> On Wed, Jan 21, 2015 at 10:44 AM, aseds <s.sami....@gmail.com> wrote:
>>
>>> hi,
>>>  this is the first time i tried and added an ImageField to my model.
>>> then i did makemigrations
>>> ./manage.py makemigrations
>>>
>>> but it said that i should do:
>>> pip install pillow
>>> (the django documentation says it's a required library too...)
>>>
>>> doing so, it gave me some errors:
>>> ~/W/d/mysite> pip install pillow
>>> Downloading/unpacking pillow
>>>   Downloading Pillow-2.7.0.tar.gz (7.4MB): 7.4MB downloaded
>>>   Running setup.py (path:/tmp/pip_build_aseds/pillow/setup.py) egg_info
>>>  for package pillow
>>>     Single threaded build, not installing mp_compile: 1 processes
>>>
>>> Installing collected packages: pillow
>>>   Running setup.py install for pillow
>>>     Single threaded build, not installing mp_compile: 1 processes
>>>
>>>     building 'PIL._imaging' extension
>>>     x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwr
>>> apv -O2 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip_build_aseds/pillow/l
>>> ibImaging -I/usr/include -I/usr/local/include -I/usr/include/python2.7
>>> -I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_6
>>> 4-2.7/_imaging.o
>>>    _imaging.c:76:20: fatal error: Python.h: No such file or directory
>>>      #include "Python.h"
>>>                         ^
>>>     compilation terminated.
>>>     error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>>>     Complete output from command /usr/bin/python -c "import setuptools,
>>>  tokenize;__file__='/tmp/pip_build_aseds/pillow/setup.py';exec(compile(
>>> getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
>>>  __file__, 'exec'))" install --record /tmp/pip-GeeYvn-record/install-re
>>> cord.txt --single-version-externally-managed --compile:
>>>     Single threaded build, not installing mp_compile: 1 processes
>>>
>>> running install
>>>
>>> running build
>>>
>>> running build_py
>>>
>>> creating build
>>>
>>> creating build/lib.linux-x86_64-2.7
>>>
>>> creating build/lib.linux-x86_64-2.7/PIL
>>>
>>> copying PIL/ImageTransform.py -> build/lib.linux-x86_64-2.7/PIL
>>> *:*
>>> *:*
>>> *:*
>>> i thought probably not all of it is important...
>>> *:*
>>> *:*
>>> *:*
>>> creating build/temp.linux-x86_64-2.7/libImaging
>>>
>>> x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv
>>> -O2 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip_build_aseds/pillow/libIm
>>> aging -I/usr/include -I/usr/local/include -I/usr/include/python2.7 -I/u
>>> sr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_64-2.
>>> 7/_imaging.o
>>>
>>> _imaging.c:76:20: fatal error: Python.h: No such file or directory
>>>
>>>  #include "Python.h"
>>>
>>>                     ^
>>>
>>> compilation terminated.
>>>
>>> error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>>>
>>> ----------------------------------------
>>> Cleaning up...
>>> Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/
>>> pip_build_aseds/pillow/setup.py';exec(compile(getattr(tokenize, 'open',
>>>  open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" inst
>>> all --record /tmp/pip-GeeYvn-record/install-record.txt --single-version
>>> -externally-managed --compile failed with error code 1 in /tmp/pip_buil
>>> d_aseds/pillow
>>> Storing debug log for failure in /home/aseds/.pip/pip.log
>>>
>>> i don't know exactly what is wrong cause i'm still a newbie with
>>> python.
>>>
>>>                     and at the end i should thank you for spending time
>>> helping me! thank you so much!
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/b5db0e6e-0d16-45bb-aec3-ac6e63bdd957%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/b5db0e6e-0d16-45bb-aec3-ac6e63bdd957%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9987888e-b08d-45fb-ae96-fd5a04a57871%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9987888e-b08d-45fb-ae96-fd5a04a57871%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALn3ei3S%3DQ%3DUFsu5ucmCvYnMOg4RORS%2BbBcDm1sKauSD9gDJmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to