簡體   English   中英

無法在Windows中安裝Pillow for Python 3.x - 需要Zlib

[英]Can't install Pillow for Python 3.x in Windows - Zlib is required

我正在使用PyCharm和Python 3.0,我想導入枕頭模塊。

從Project Interpreter安裝Pillow模塊時,我收到一條消息說:

ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting.

在此輸入圖像描述

我也嘗試通過使用pip install和easy install來從命令行安裝相同的命令,但是命令行也拋出相同的錯誤。

我試圖在互聯網上找到幾種解決方案,但大多數都是針對Linux的。 例如,這個解決方案: 沒有名為zlib的模塊

如何在Windows和PyCharm中解決此問題?

它的簡單去Virtualenv

並運行

easy_install Pillow

它工作正常

我花了差不多一天搞清楚枕頭安裝有什么問題。 直到昨天工作正常,從今天起突然停止工作。 終於明白了,很少有我的隊友將python升級到3.6版本,現在可以下載了。 由於Pillow尚未與3.6兼容,並且僅支持3.5.2,因此會出現此錯誤。

Resolution is to check if Pillow supports your version of python. Once I reverted python back to 3.5.2 the installation worked like a charm and no errors encountered.

希望這有助於解決您的問題。

文件>設置>項目測試>項目翻譯> ADD> Pillow-PIL

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM