安裝 python PIL (pillow)


PIL是Python平台事實上的圖像處理標准庫,支持多種格式,並提供強大的圖形與圖像處理功能。

PIL 模塊全稱為 Python Imaging Library,是python中一個免費的圖像處理模塊。

 

PIL(Python Imaging Library)是Python中一個強大的圖像處理庫,但目前其只支持到Python2.7

pillow是PIL的一個分支,雖是分支但是其與PIL同樣也具有很強的圖像處理庫。

 

 

 

安裝PIL

1.確認你的版本

2.如果是Python 2.7 直接 pip install PIL

3. 如果是Python 3.7 用 pip install pillow

4.打開pycharm導入模塊嘗試是否標紅

 

>>> from pil import Image
>>> from PIL import Image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PIL'
>>>

 

>>> import pil
>>> import PIL
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PIL'

 

 

 

 

pillow官網:

https://python-pillow.org/

https://pypi.org/project/PIL/

About pillow

Goals

The fork author’s goal is to foster and support active development of PIL through:

License

Like PIL, Pillow is licensed under the open source HPND License

Why a fork?

PIL is not setuptools compatible. Please see this Image-SIG post for a more detailed explanation. Also, PIL’s current bi-yearly (or greater) release schedule is too infrequent to accommodate the large number and frequency of issues reported.

What about PIL?

Note

Prior to Pillow 2.0.0, very few image code changes were made. Pillow 2.0.0 added Python 3 support and includes many bug fixes from many contributors.

As more time passes since the last PIL release (1.1.7 in 2009), the likelihood of a new PIL release decreases. However, we’ve yet to hear an official “PIL is dead” announcement.

 

 

REF

https://www.jianshu.com/p/e8d058767dfa

https://www.cnblogs.com/chimeiwangliang/p/7127542.html

https://blog.csdn.net/bryant_meng/article/details/81299874

https://blog.csdn.net/bryant_meng/article/details/86185490


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM