tigerben

入驻于 2020-02-24 / MAKE 主页

tigerben 创作的主题

想学点东西太难了

分享 tigerben 2020-02-27最后回复来自 tigerben
8


tigerben 发表的回复
回复了 tigerben 创建的主题 分享 / 想学点东西太难了
2020-02-27

好的,谢谢您的指点,有空再试一下,非常感谢

回复了 tigerben 创建的主题 分享 / 想学点东西太难了
2020-02-27

这个是按照您的帖子里安装PIL的结果

pi@moode:~/Pillow-3.4.2 $ cd ~
pi@moode:~ $ sudo apt-get install python-pil python3-pil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libimagequant0 libwebpdemux2 python-olefile python3-olefile
Suggested packages:
python-pil-doc python-pil-dbg python3-pil-dbg
The following NEW packages will be installed:
libimagequant0 libwebpdemux2 python-olefile python-pil python3-olefile
python3-pil
0 upgraded, 6 newly installed, 0 to remove and 48 not upgraded.
Need to get 728 kB/914 kB of archives.
After this operation, 3,164 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://raspbian.raspberrypi.org/raspbian buster/main armhf python-pil armhf 5.4.1-2
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err:2 http://raspbian.raspberrypi.org/raspbian buster/main armhf python3-pil armhf 5.4.1-2
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/p/pillow/python-pil_5.4.1-2_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/p/pillow/python3-pil_5.4.1-2_armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

回复了 tigerben 创建的主题 分享 / 想学点东西太难了
2020-02-27

--------------------------------------------------
又用SSH安装如下,

pi@moode:~/Pillow-3.4.2 $ cd ~
pi@moode:~ $ pip install -i https://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com pillow
Looking in indexes: https://pypi.doubanio.com/simple/, https://www.piwheels.org/simple
Collecting pillow
/usr/share/python-wheels/urllib3-1.24.1-py2.py3-none-any.whl/urllib3/connectionpool.py:849: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
/usr/share/python-wheels/urllib3-1.24.1-py2.py3-none-any.whl/urllib3/connectionpool.py:849: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
Downloading https://pypi.doubanio.com/packages/b3/d0/a20d8440b71adfbf133452d4f6e0fe80de2df7c2578c9b498fb812083383/Pillow-6.2.2.tar.gz (37.8MB)
100% |████████████████████████████████| 37.8MB 4.7MB/s
Building wheels for collected packages: pillow
Running setup.py bdist_wheel for pillow ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ZT9LKY/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-sy5hxa --python-tag cp27:
running bdist_wheel
中间省略。。。。。。。。。。。

reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.codecov.yml'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'azure-pipelines.yml'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.azure-pipelines'
no previously-included directories found matching '.travis'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext


The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ZT9LKY/pillow/setup.py", line 903, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html



----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ZT9LKY/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-AihePi/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-ZT9LKY/pillow/

回复了 tigerben 创建的主题 分享 / 想学点东西太难了
2020-02-27

感谢您的回复,我用SSH/WINSCP两种方法安装了Pillow,但始终显示找不到PIL,


Last login: Wed Feb 26 17:25:08 2020
Traceback (most recent call last):
File "/home/pi/MoodeAudio-OLED/moode-oled-splash.py", line 15, in <module>
from PIL import Image
ImportError: No module named PIL
pi@moode:~ $ Traceback (most recent call last):
File "/home/pi/MoodeAudio-OLED/moode-oled-mod.py", line 23, in <module>
from PIL import Image
ImportError: No module named PIL

回复了 tigerben 创建的主题 分享 / 想学点东西太难了
2020-02-27

这个是用WINSCP 安装的结果,烦请您帮忙指点一下,谢谢。
/home/pi/Pillow-3.4.2$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing Pillow.egg-info/PKG-INFO
writing top-level names to Pillow.egg-info/top_level.txt
writing dependency_links to Pillow.egg-info/dependency_links.txt
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
writing manifest file 'Pillow.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 753, in <module>
zip_safe=not debug_build(), )
File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 24, in run
self.build()
File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build
self.run_command('build_ext')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "setup.py", line 521, in build_extensions
' using --disable-%s, aborting' % (f, f))
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting