Python打包与常见问题记录

打包工具篇选择


pyinstaller配置

  • pip install installer
  • setuptools(打包后提示:ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
    • 解决方式1:在源码中引入包import pkg_resources.py2_warn
    • 解决方式2:降低版本
      • pip uninstall setuptools pip install setuptools==44.0.0
      • pip install update setuptools==44.0.0
  • 优点
  • 缺点
    • 缺乏隐式包,解决方案之一就是主动包含

打包参数篇


发布了17 篇原创文章 · 获赞 9 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/toothing/article/details/105563528