unix 我使用pyinstller使我的项目包,但它给出了错误,当我在另一台电脑上运行该exc文件

jgwigjjp  于 2023-11-18  发布在  Unix
关注(0)|答案(1)|浏览(176)

当我在另一台PC上运行exc文件时,它会出错。但在我PC上,exc文件运行顺利,但在另一台PC上,它会出错,

Traceback (most recent call last):
  File "main.py", line 5, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 391, in exec_module
  File "Create_table/create_table_PT.py", line 3, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 391, in exec_module
  File "db_connection.py", line 12, in <module>
sqlite3.OperationalError: unable to open database file
[41403] Failed to execute script 'main' due to unhandled exception!

字符串

dsf9zpds

dsf9zpds1#

只需尝试命令:- pyinstaller --onefile“你的python文件名”

相关问题