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 "setup.py", line 28, in <module>
keywords = ['baidu', 'aip', 'ocr', 'antiporn', 'nlp', 'face', 'kg', 'speech'],
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 "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run()
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 411, in run
self.easy_install(spec, not self.no_deps)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 700, in install_item
self.process_distribution(spec, dist, deps)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 745, in process_distribution
[requirement], self.local_index, self.easy_install
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 672, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 698, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 879, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1118, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1104, in run_setup
run_setup(setup_script, args)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 257, in run_setup
raise
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 199, in setup_context
yield
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 170, in save_modules
saved_exc.resume()
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 145, in resume
six.reraise(type, exc, self._tb)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 158, in save_modules
yield saved
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 199, in setup_context
yield
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 49, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-WbvAjF/Pillow-4.3.0/setup.py", line 799, in <module>
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 "setup.py", line 28, in <module>
keywords = ['baidu', 'aip', 'ocr', 'antiporn', 'nlp', 'face', 'kg', 'speech'],
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 "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run()
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 411, in run
self.easy_install(spec, not self.no_deps)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 700, in install_item
self.process_distribution(spec, dist, deps)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 745, in process_distribution
[requirement], self.local_index, self.easy_install
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 672, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 698, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 879, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1118, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1104, in run_setup
run_setup(setup_script, args)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 257, in run_setup
raise
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 199, in setup_context
yield
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 170, in save_modules
saved_exc.resume()
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 145, in resume
six.reraise(type, exc, self._tb)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 158, in save_modules
yield saved
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 199, in setup_context
yield
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "/home/appleyuchi/.virtualenvs/python2.7/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 49, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-WbvAjF/Pillow-4.3.0/setup.py", line 799, in <module>
setuptools.sandbox.UnpickleableException: RequiredDependencyException('\n\nThe headers or library files could not be found for jpeg,\na required dependency when compiling Pillow from source.\n\nPlease see the install instructions at:\n https://pillow.readthedocs.io/en/latest/installation.html\n\n',)
以上问题是在python2.7下面出现的。
SDK的下载网址:
http://yuyin.baidu.com/sdk/down?appId=10335958
具体下载位置是(下载图中的python sdk即可):
解决方案:
安装Pillow和requests