Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 未使用BB冷冻柜安装PIL包_Python_Python Imaging Library_Openpyxl - Fatal编程技术网

Python 未使用BB冷冻柜安装PIL包

Python 未使用BB冷冻柜安装PIL包,python,python-imaging-library,openpyxl,Python,Python Imaging Library,Openpyxl,我正在尝试将Python2.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

我正在尝试将Python2.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_资源”、“数字”和“管道”必须是“include”子句的一部分

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