【发布时间】:2022-11-22 21:01:21
【问题描述】:
我使用 pyinstaller -F lpxl_handler_simp.py 从项目中生成一个独立文件。它生成文件并在 dist/ 目录中执行良好,直到我将文件放到另一个目录中。当我将它放到另一个目录并尝试通过 Linux 终端执行它时,我收到了 -bash: ./lpxl_handler_simp: Permission deined 错误消息。
我也尝试了 pyinstaller -D lpxl_handler_simp.py 选项,它给出了同样的错误。这是我的规格文件:
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(
['lpxl_handler_simp.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='lpxl_handler_simp',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
非常感谢任何有助于此问题的建议。
【问题讨论】:
标签: pyinstaller