pyinstaller main.spec 664 INFO: Platform: Windows-10-10.0.19041-SP0 668 INFO: Extending PYTHONPATH with paths ['C:\\Users\\Administrator\\PycharmProjects\\pythonProject', 'C:\\Users\\Administrator\\PycharmProjects\\pythonProject', 'C:\\Users\\Administrator\\PycharmProjects\\pythonProject\\venv\\Lib\\site-packages'] 1199 INFO: Appending 'datas' from .spec Unable to find "C:\Users\Administrator\PycharmProjects\pythonProject\onnxruntime_providers_shared.dll" when adding binary and data files.
时间: 2023-07-24 20:16:19 浏览: 51
根据你提供的信息,PyInstaller 在尝试添加二进制和数据文件时遇到了一个错误。它无法找到路径为 "C:\Users\Administrator\PycharmProjects\pythonProject\onnxruntime_providers_shared.dll" 的文件。
请确保该文件存在于指定的路径,并且文件名的大小写与实际文件名匹配。另外,还要确保你有足够的权限来访问该文件。
如果文件确实存在,并且路径和文件名都正确无误,那么可能是由于其他原因导致的问题。你可以尝试在打包之前手动将该文件复制到指定的路径,然后再次运行 PyInstaller。
相关问题
PS C:\Users\Administrator\PycharmProjects\pythonProject9> pyinstaller main.spec 387 INFO: PyInstaller: 5.13.0 387 INFO: Python: 3.8.6 388 INFO: Platform: Windows-10-10.0.19041-SP0 391 INFO: Extending PYTHONPATH with paths ['C:\\Users\\Administrator\\PycharmProjects\\pythonProject9', 'C:\\Users\\Administrator\\PycharmProjects\\pythonProject9', 'C:\\Users\\Administrator\\PycharmProjects\\pythonProject5\\venv\\Lib\\site-packages'] 950 INFO: Appending 'datas' from .spec Unable to find "C:\Users\Administrator\PycharmProjects\pythonProject9\onnxruntime_providers_shared.dll" when adding binary and data files.
根据你提供的日志信息,看起来在打包过程中出现了一个错误。错误信息显示在添加二进制和数据文件时,找不到 "C:\Users\Administrator\PycharmProjects\pythonProject9\onnxruntime_providers_shared.dll"。
这个错误通常是由于指定的文件路径错误或文件确实不存在而引起的。请确保指定的文件路径是正确的,并且文件确实存在于该位置。
如果文件确实存在于指定位置,那么可能是由于权限问题导致无法读取该文件。在这种情况下,你可以尝试使用管理员权限运行打包命令,或者将该文件复制到一个更容易访问的位置(例如与脚本文件相同的目录),然后在.spec文件中更新路径。
如果问题仍然存在,请提供更多关于你的项目结构和.spec文件内容的信息,以便我能够更准确地帮助你解决问题。
1184 INFO: PyInstaller: 5.10.1 1185 INFO: Python: 3.10.11 1218 INFO: Platform: Windows-10-10.0.19045-SP0 option(s) not allowed: --onedir/--onefile --console/--nowindowed/--windowed/--noconsole makespec options not valid when a .spec file is given
这个错误信息表明你正在使用 PyInstaller 5.10.1 编译一个 Python 3.10.11 的应用程序,并尝试使用 `--onedir/--onefile` 或 `--console/--nowindowed/--windowed/--noconsole` 选项生成可执行文件,但这些选项在给定 .spec 文件时是无效的。
你需要检查你的 PyInstaller 命令行参数,确保没有使用无效的选项。如果你想生成可执行文件,可以尝试使用以下命令:
```
pyinstaller your_script.py --name your_app --onefile
```
这将生成一个名为 `your_app` 的单个可执行文件。如果你想生成一个目录包含所有依赖项的应用程序,可以使用以下命令:
```
pyinstaller your_script.py --name your_app --onedir
```
这将生成一个名为 `your_app` 的目录,其中包含所有应用程序和依赖项。