pyinstaller

Include multiple data files with pyinstaller

自作多情 提交于 2020-02-22 07:25:11
问题 I need to include a DLL AND a text file in a pyinstaller "onefile" executable. I can add just the DLL but if I try to specify both files, pyinstaller complains. I would rather use the command line options (rather than the spec file) - what's the correct format for multiple files? http://pyinstaller.readthedocs.io/en/stable/spec-files.html#adding-data-files http://pyinstaller.readthedocs.io/en/stable/usage.html#options-group-what-to-bundle-where-to-search Tried a few things, e.g. pyinstaller:

Include data with spec file using pyinstaller

依然范特西╮ 提交于 2020-02-07 04:04:33
问题 I am trying to bundle an application written in Python and include the relevant data files in the bundle. What is wrong with the way I am adding in data? This is using a spec file to exclude certain libraries and include data files. I run the cmd pyinstaller --onefile main.spec # -*- mode: python -*- block_cipher = None added_data = [('file_one.pickle', '.'), ('file_two.pickle', '.'), ('file_three.pickle', '.')] excluded_libraries = [XXX] a = Analysis(['main.py'], pathex=['C:\\Users\\XXX\\XXX

Include data with spec file using pyinstaller

淺唱寂寞╮ 提交于 2020-02-07 04:04:25
问题 I am trying to bundle an application written in Python and include the relevant data files in the bundle. What is wrong with the way I am adding in data? This is using a spec file to exclude certain libraries and include data files. I run the cmd pyinstaller --onefile main.spec # -*- mode: python -*- block_cipher = None added_data = [('file_one.pickle', '.'), ('file_two.pickle', '.'), ('file_three.pickle', '.')] excluded_libraries = [XXX] a = Analysis(['main.py'], pathex=['C:\\Users\\XXX\\XXX

Unable to run PyInstaller - “Please install PyWin32 or pywin32-ctypes”

ⅰ亾dé卋堺 提交于 2020-02-06 08:38:50
问题 I'm using Python 3.7 32-bit on Windows 10 64-bit. Python was installed from the executable file on the Python website and NOT Anaconda package. When I run pyinstaller from the command prompt, it returns an error: Error Message I've already installed pypiwin32, pywin32 and win32ctypes. But still have the error. I tried running pyinstaller from Windows CMD, Pycharm, and a virtual environment, all with the necessary libraries installed, but I'm unable to make it work. I've googled a lot on this

Unable to run PyInstaller - “Please install PyWin32 or pywin32-ctypes”

拟墨画扇 提交于 2020-02-06 08:37:30
问题 I'm using Python 3.7 32-bit on Windows 10 64-bit. Python was installed from the executable file on the Python website and NOT Anaconda package. When I run pyinstaller from the command prompt, it returns an error: Error Message I've already installed pypiwin32, pywin32 and win32ctypes. But still have the error. I tried running pyinstaller from Windows CMD, Pycharm, and a virtual environment, all with the necessary libraries installed, but I'm unable to make it work. I've googled a lot on this

Error opening Python .exe files on other Windows computers

孤者浪人 提交于 2020-02-06 08:02:09
问题 I have a Python script that I wrote on my personal Windows computer. It's very, very basic and just shows a tkinter window with a couple labels. I compiled it into an .exe file using pyinstaller with the --onefile option. When I run that .exe file on that same computer, it all works just fine. If I copy the .exe file to a coworker's computer (also Windows), running it causes the command prompt to flash an error quickly. Opening the command prompt and executing it by typing the path, this is

PyInstaller: “No module named Tkinter”

隐身守侯 提交于 2020-02-02 03:19:06
问题 I've built a Python (2.7) app that uses Tkinter and am trying to build a Windows7 .exe using Pyinstaller (3.2). The app works find in windows is I run it as python myapp.py , but once compiled into a pyinstaller distributable, I get this error message: ImportError: No module named Tkinter Just to be sure, the top of myapp.py contains: from copy import deepcopy import cPickle as pickle import Tkinter as tk from PIL import ImageTk Checking the distribution directory, I see tk85.dll, tcl85.dll

PyInstaller win32ctypes.pywin32.pywintypes.error: (2, 'LoadLibraryExW', 'The system cannot find the file specified.')

混江龙づ霸主 提交于 2020-01-30 05:21:19
问题 While using PyInstaller (dev version 4.0.dev0+8196c57ab), produced an OSError: [WinError 2] 'The system cannot find the file specified.' Python version: 3.7 GUI: PySide2 5.13.0 Other packages: lxml, BeautifulSoup, Matplotlib (with dependencies like numpy), Pandas, pypiwin32, reportlab, Theano Anaconda 3, Windows Compiled with PyInstaller --onedir What I've tried: Tried downgrading PyInstaller to 2.1 as suggested here: https://github.com/pyinstaller/pyinstaller/issues/3916 but doesn't work as

How to remove/exclude modules and files from pyInstaller?

这一生的挚爱 提交于 2020-01-29 07:02:06
问题 I'm trying to shrink the size of my python exe file, I've been looking around but I can't seem to find a good answer for removing extra modules. At the moment, I'm discovering that it's deleting modules I need instead of the ones I'm telling it to. The documentation is rather unhelpful and neither are examples I've found so far. My spec file: a = Analysis(['D:\\<path>\\<scriptName>.py'], pathex=['c:\\bin\\pyinstaller-2.0'], hiddenimports=[], hookspath=None, ) pyz = PYZ(a.pure) exe = EXE(pyz,

How can I add a Python site-package folder (that's not being included) to a PyInstaller spec file?

。_饼干妹妹 提交于 2020-01-25 06:15:29
问题 I am having trouble including a python package while using PyInstaller, particularly docxcompose . This is a package that needs to import its site-package folder within the PyInstaller directory. I have pip installed docxcompose and it is in my site-packages library, with the folder labeled as docxcompose . import docxcompose is explicitly listed in the python file I am referencing in PyInstaller. I am debugging using a spec file and the --onedir method, as I want to eventually install using