I'm trying install bCNC (https://github.com/vlachoudis/bCNC) that require the Pillow module.
I have also tried to install manually the pillow module :
python2 -m pip install --upgrade 'Pillow>=4.0'
I have a DEBIAN Stretch Stable OS, so I thought it will install Pillow 4.0
https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=python-pil
the program try to install Pillow 6.0 that make some errors and goes wrong.
Please include code that reproduces the issue and whenever possible, an image that demonstrates the issue. Please upload images to GitHub, not to third-party file hosting sites. If necessary, add the image to a zip or tar archive.
The best reproductions are self-contained scripts with minimal dependencies. If you are using a framework such as plone, Django, or buildout, try to replicate the issue just using Pillow.
python2 -m pip install --upgrade 'Pillow>=4.0'
OPi Zero - Debian Stretch - Pillow 4.0.0 install manually - Error.txt
It looks like you're missing python-dev. https://pillow.readthedocs.io/en/stable/installation.html#building-from-source
https://pip.pypa.io/en/stable/reference/pip_install/
Once pip has the set of requirements to satisfy, it chooses which version of each requirement to install using the simple rule that the latest version that satisfies the given constraints will be installed
@hsoft It seems working better with the python-dev
I have tried to install without a sudo in this way : python2 -m pip install --upgrade 'Pillow>=4.0'
I have a problem at the end :
running install_lib
creating /usr/local/lib/python2.7/dist-packages/PIL
error: could not create '/usr/local/lib/python2.7/dist-packages/PIL': Permission denied
Then, I have tried to reinstall it with a sudo prefix : sudo python2 -m pip install --upgrade 'Pillow>=4.0'
But I have had an killed error message. So I have reboot my device and try again :
An new error message : MemoryError
So what does it mean ?
I have 512MB RAM on my device, is it enough ?
I have enough free space on my SD card.
What kind of memory does speak about this error message ?
I have also seen that we can check Pillow installation by executing the selftest.py script. Where can I find this file ?
OPi Zero - Debian Stretch - Pillow 6.0.0 install manually - Error - First try.txt
OPi Zero - Debian Stretch - Pillow 6.0.0 install manually - Error - Second try (after reboot).txt
I don't expect selftest.py to be a part of your pip installed Pillow. However, you can find it at https://github.com/python-pillow/Pillow/blob/master/selftest.py
@hsoft Since the beginning, I have Sometimes this error when trying to install Pillow : At 99%, I have a "Killed" error message.
OPi Zero - Debian Stretch - Pillow install via pip2 - Killed Error.txt
I presume that the Killed and the memory error have the same root problem - see https://stackoverflow.com/questions/37643451/why-does-my-numpy-install-keeps-being-killed for another instance of the problem where memory is deemed to be the issue. https://stackoverflow.com/questions/30550235/pip-install-killed might help.
@radarhere I can confirm the memory error with the dmesg cmd :
[ 1882.949982] [ 2810] 0 2810 1567 2 14336 93 0 sudo
[ 1882.949991] [ 2811] 0 2811 110260 59857 438272 42232 0 pip2
[ 1882.949995] Out of memory: Kill process 2811 (pip2) score 540 or sacrifice child
[ 1882.950020] Killed process 2811 (pip2) total-vm:441040kB, anon-rss:239420kB, file-rss:8kB, shmem-rss:0kB
[ 1883.165945] oom_reaper: reaped process 2811 (pip2), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
pizero@orangepizero:/$
It seems that I have finally succeeded to install Pillow v6.0.0 by adding the --no-cache-dir option :
pizero@orangepizero:/$ sudo pip2 install Pillow --no-cache-dir
Collecting Pillow
Downloading https://files.pythonhosted.org/packages/81/1a/6b2971adc1bca55b9a53ed1efa372acff7e8b9913982a396f3fa046efaf8/Pillow-6.0.0.tar.gz (29.5MB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 29.5MB 1.4MB/s
Installing collected packages: Pillow
Running setup.py install for Pillow ... done
Successfully installed Pillow-6.0.0
pizero@orangepizero:/$
pizero@orangepizero:/$ sudo pip2 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
Pillow (6.0.0)
pip (9.0.1)
setuptools (33.1.1)
pizero@orangepizero:/$
Congratulations. Is that all that you were after with this issue?
@radarhere Yes, it sounds good !!! You can close the issue. Thanks