Pyinstaller构建后运行可执行文件时出现错误 = “Pyarrow.vendored.version”

huangapple go评论64阅读模式
英文:

Pyinstaller Error when running executable after build = "Pyarrow.vendored.version"

问题

我使用PyInstaller构建了一个可执行文件,但在运行可执行文件时遇到了一个"pyarrow.vendored.version"错误。有没有人知道如何解决这个问题?似乎是在PyInstaller构建过程中安装的某些内容引起的。任何帮助将不胜感激!

我尝试了使用"pyinstaller --onefile -w 'file.py'",也尝试了使用auto-py-to-exe来处理相同的file.py... 结果都一样。

英文:

I built an executable file using PyInstaller and ran into a "pyarrow.vendored.version" error while running the executable output. Does anyone have any idea how to get around this issue? It seems to be something that is installed during the pyinstaller build. Any help would be appreciated!

I tried doing just a pyinstaller --onefile -w "file.py" and I also tried the same file.py using auto-py-to-exe... both ended in the same result.

答案1

得分: 4

我遇到了同样的问题,并通过在pyinstaller中使用"--hidden-import"选项来编译解决了它。以下是一个示例...

pyinstaller.exe -F -n "程序名称" --hidden-import=pyarrow.vendored.version 程序.py

希望对你有所帮助!

英文:

I had the same problem and fixed it by compiling with the "--hidden-import" option given to pyinstaller. Here is an example...

pyinstaller.exe -F -n "Program name" --hidden-import=pyarrow.vendored.version program.py

Hope this helps!

答案2

得分: 0

希望提到的是,另一种方法是在运行以下命令之前,在a=Analysis()中的你的program.spec文件中添加:

hiddenimports=['pyarrow.vendored.version']

然后运行:

pyinstaller program.spec --clean
英文:

Wanted to mention that the alternative is to add

hiddenimports=[‘pyarrow.vendored.version’]

to your program.spec file in a=Analysis() before running

pyinstaller program.spec —-clean

huangapple
  • 本文由 发表于 2023年2月18日 02:07:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75487848.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定