繁体   English   中英

PIL软件包未使用bbfreezer安装

[英]PIL package not installing using bbfreezer

我正在尝试将Python 2.7脚本打包到exe中,以便可以在没有本地安装Python的环境中运行。 该脚本在Python中运行时会完全执行,但是当我将其作为exe运行时,出现此错误:

ImportError: You must install PIL to fetch image objects

我在脚本openpyxl中运行的另一个软件包需要PIL。 我正在使用最新版本的openpyxl(2.4.2)。

这是我的bbfreeze导入脚本:

   from bbfreeze import Freezer
   f = Freezer("AthenaHighDef", includes('csv','datetime','sqlite3','calendar','operator', 'os', 'dateutil', 'openpyxl', 'PIL', 'winsound'))
   f.addScript ("athenahighdef.py")
   f()

任何帮助,将不胜感激。 谢谢。

使用bbfreeze导入PIL时,在编写脚本时,还要求'pkg_resources','numbers'和'pipes'是“ includes”子句的一部分。

f = Freezer("PilTest", includes=('PIL', 'pkg_resources', 'numbers', 'pipes'))

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM