cx_Freeze,同时创建不识别JIRA的可执行文件

时间:2019-11-07 15:43:13

标签: python executable cx-freeze python-jira

我正在使用python'cx_Freeze'模块创建可执行文件。尽管我安装了jira软件包,但出现以下错误:

   C:\Users\shanmuganandhavadive\PycharmProjects\Jira_tool\build\exe.win-amd64-3.7>jira_auto_ticket_creation_UI.exe
   Traceback (most recent call last):
   File "C:\Users\shanmuganandhavadive\AppData\Local\Programs\Python\Python37\lib\site-packages\pbr\version.py", line 442, in _get_version_from_pkg_resources
   provider = pkg_resources.get_provider(requirement)
   File "C:\Users\shanmuganandhavadive\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources\__init__.py", line 357, in get_provider
   return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
   File "C:\Users\shanmuganandhavadive\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources\__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
   File "C:\Users\shanmuganandhavadive\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources\__init__.py", line 786, in resolve
   raise DistributionNotFound(req, requirers)
   pkg_resources.DistributionNotFound: The 'jira' distribution was not found and is required by the application

我已经在这里阅读过这篇文章: I created a python executable by using pyinstaller, but the module imported to my .py script is not present when I execute executable

但是对cx_Freeze做同样的事情并没有多大帮助。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

我通过include_files包括了丢失的包裹,并解决了问题。

参考:https://github.com/anthony-tuininga/cx_Freeze/issues/438#issuecomment-472954154