首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ModuleNotFoundError:没有名为“_sysconfigdata_m_darwin_darwin”的模块

ModuleNotFoundError:没有名为“_sysconfigdata_m_darwin_darwin”的模块
EN

Stack Overflow用户
提问于 2020-07-07 23:33:51
回答 1查看 430关注 0票数 1

我正在用Python为我的团队开发一个Rally reporting工具,并尝试使用cx-freeze将其打包。我收到了一个ModuleNotFound错误,我想知道是不是因为cx-freeze不支持pygal (我真的希望不是这样的,因为我必须重写很多东西)

代码语言:javascript
复制
celinaperalta$ /Users/celinaperalta/Documents/NYLTesting/rally-exports/build/exe.macosx-10.9-x86_64-3.7/RallyGUI ; exit;
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cx_Freeze/initscripts/__startup__.py", line 40, in run
    module.run()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cx_Freeze/initscripts/Console.py", line 37, in run
    exec(code, {'__name__': '__main__'})
  File "RallyGUI.py", line 8, in <module>
  File "/Users/celinaperalta/Documents/NYLTesting/rally-exports/build/exe.macosx-10.9-x86_64-3.7/RallyReportTool.py", line 7, in <module>
    import pygal
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pygal/__init__.py", line 28, in <module>
    import pkg_resources
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 959, in <module>
    class Environment:
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 963, in Environment
    self, search_path=None, platform=get_supported_platform(),
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 190, in get_supported_platform
    plat = get_build_platform()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 395, in get_build_platform
    plat = get_platform()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sysconfig.py", line 675, in get_platform
    get_config_vars(),
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sysconfig.py", line 551, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/sysconfig.py", line 422, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_m_darwin_darwin'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-07-08 15:18:46

cx_freeze不会自动包含所有包。当您找到ModuleNotFoundError时,您需要在您的设置中显式包含该模块,如下所示-

build_exe_options = {'packages':'_sysconfigdata_m_darwin_darwin'}

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62778818

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档