我是靠谱客的博主 冷静小笼包,这篇文章主要介绍RuntimeError: Cannot automatically determine get_config module, because it is not called from inside,现在分享给大家,希望可以做个参考。

pyinstaller astropy模块打包遇到问题:

RuntimeError: Cannot automatically determine get_config module, because it is not called from inside

  • 报错描述:
    我写了一个PyQt5程序,运行起来完全没问题,但打包之后就报错:(原来的报错代码我找不着了:-),意思就是在astropy/config/configuration.py中有一模块 == None 所以执行了 msg1 + msg2的报错语句 “RuntimeError: Cannot automatically determine get_config module, because it is not called from inside”
  • 问题解决:
    这个问题是由于astropy打包之后与原开发的与python版本不兼容导致的,所以可以将更稳定版本的astropy模块代码直接替换原来的整个模块,亲测有效:
    链接:https://pan.baidu.com/s/1Q6-GLs3RHI32AexR4tyULA
    提取码:osz2
  • 步骤:
    解压astropy文件后,在PyCharm(我用的IDE):项目名 venv Lib site-packages 下面找到 astropy这个文件夹,然后将我分享的内容解压后直接替换掉,重新打包项目就OK了,资源失效了或有其他问题请留言在这里插入图片描述
    just stick to your f**kin bug

最后

以上就是冷静小笼包最近收集整理的关于RuntimeError: Cannot automatically determine get_config module, because it is not called from inside的全部内容,更多相关RuntimeError:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(119)

评论列表共有 0 条评论

立即
投稿
返回
顶部