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

问题描述 投票:0回答:1

我正在使用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做同样的事情没有多大帮助。任何帮助将不胜感激。

python executable cx-freeze python-jira
1个回答
0
投票

我发现了此问题的解决方法。如果将来有人需要,我将在此处提供答案。

https://github.com/anthony-tuininga/cx_Freeze/issues/438中所述,通过'include_files'包含缺少的软件包

© www.soinside.com 2019 - 2024. All rights reserved.