[英]PIP install PIL python2.7 ubuntu 14.04.1
I'm trying to install PIP to run an older application and have followed a number of steps the final hurdle is installing PIP. 我正在尝试安装PIP以运行较旧的应用程序,并遵循了许多步骤来安装PIP。 The reason for this is the functionality I'm trying to use is showing this error:
原因是我要使用的功能正在显示此错误:
ImportError: No module named PIL
I followed the instruction at http://prateekvjoshi.com/2014/04/19/how-to-install-pil-on-ubuntu/ 我按照http://prateekvjoshi.com/2014/04/19/how-to-install-pil-on-ubuntu/上的说明进行操作
And had to change the command slightly to: 并且不得不将命令稍微更改为:
sudo pip install PIL --allow-external PIL --allow-unverified PIL sudo pip install PIL --allow-外部PIL --allow-未经验证的PIL
I'm getting some errors and not sure how to resolve these: 我遇到一些错误,不确定如何解决这些问题:
Can anyone share any ideas? 谁能分享任何想法? I'm sure its just a library or something missing?
我确定它只是一个图书馆还是缺少什么?
Thanks 谢谢
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1197, in prepare_files
do_download,
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1375, in unpack_url
self.session,
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 582, in unpack_http_url
unpack_file(temp_location, location, content_type, link)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 625, in unpack_file
untar_file(filename, location)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 543, in untar_file
tar = tarfile.open(filename, mode)
File "/usr/lib/python2.7/tarfile.py", line 1678, in open
return func(name, filemode, fileobj, **kwargs)
File "/usr/lib/python2.7/tarfile.py", line 1727, in gzopen
**kwargs)
File "/usr/lib/python2.7/tarfile.py", line 1705, in taropen
return cls(name, mode, fileobj, **kwargs)
File "/usr/lib/python2.7/tarfile.py", line 1574, in __init__
self.firstmember = self.next()
File "/usr/lib/python2.7/tarfile.py", line 2335, in next
raise ReadError(str(e))
ReadError: invalid header
Storing debug log for failure in /home/peek/.pip/pip.log
Maybe you can check again, how many bits of your computer? 也许您可以再次检查计算机的多少位?
install PIL on 64-bit Ubuntu 12.04
How about this? 这个怎么样? https://askubuntu.com/questions/507459/pil-install-in-ubuntu-14-04-1-lts
https://askubuntu.com/questions/507459/pil-install-in-ubuntu-14-04-1-lts
$ sudo apt-get build-dep python-imaging
$ sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
$ sudo pip install Pillow
For Check Version on Python 对于Python的检查版本
>>> import PIL
>>> PIL.VERSION
'1.1.7'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.