英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论