【问题标题】:Pyinstaller -bash Permission deniedPyinstaller -bash 权限被拒绝
【发布时间】: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


    【解决方案1】:

    我建议使用命令chmod 授予它权限。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-01-15
      • 2011-08-20
      • 2014-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-15
      相关资源
      最近更新 更多