Python Pyinstaller standalone exe不能与其他计算机上的pandas和tkinter一起使用

Python Pyinstaller standalone exe不能与其他计算机上的pandas和tkinter一起使用,python,pandas,tkinter,pyinstaller,python-exec,Python,Pandas,Tkinter,Pyinstaller,Python Exec,我正在尝试构建pyinstaller exe,我想在所有windows 10计算机上运行它。我正在使用anaconda和一些python包。但当我在其他电脑上试用时,它就停止工作了 我的规范文件看起来像 # -*- mode: python ; coding: utf-8 -*- block_cipher = None a = Analysis(['start.py'], pathex=['C:\\abc\\iel\\PI_folder\\GUI'],

我正在尝试构建pyinstaller exe,我想在所有windows 10计算机上运行它。我正在使用anaconda和一些python包。但当我在其他电脑上试用时,它就停止工作了

我的规范文件看起来像

# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(['start.py'],
             pathex=['C:\\abc\\iel\\PI_folder\\GUI'],
             binaries=[],
             datas=[('logo.png', '.img')],
             hiddenimports=['pandas', 'tkinter.filedialog', 'PIL.ImageTk', 'PIL.Image', 'tqdm'],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=True)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          [('v', None, 'OPTION')],
          name='start',
          debug=True,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          upx_exclude=[],
          runtime_tmpdir=None,
          console=True )
我使用的命令是

pyinstaller --noconfirm --hidden-import=pandas --hidden-import=tkinter.filedialog --hidden-import=PIL.ImageTk --hidden-import=PIL.Image --hidden-import=tqdm  --add-data "logo.png;.img" --debug=all --onefile start.py 
我是不是遗漏了什么?有人能帮我吗


提前谢谢。

尽量不要使用蟒蛇。相反,请尝试创建一个pythonvirtualenv,其中包含要与PyInstaller二进制文件捆绑的每个Python包。这将使PyInstaller程序更容易确定要捆绑的内容。您已经包含了“logo.png”文件,它将被放在最终输出文件夹的
.img
目录中。你的代码迎合了“logo.png”两个位置的不同吗?@JamesMishra我试过了,但没有成功。无法执行exe文件。