pyinstaller

Run Python binaries under Windows XP

心不动则不痛 提交于 2019-12-31 04:26:13
问题 I compiled my PySide application to both x32 and x64 mode and it's work under Windows 7+. However I found that the application can't start under Windows XP. Should I use some tricks in spec-file additionally? Current PyInstaller script shown below in app.spec file: pyinstaller src/app.spec # -*- mode: python -*- import os import platform from PySide import QtCore onefile = False console = False platform_name = platform.system().lower() app_name = {'linux': 'app', 'darwin': 'app', 'windows':

PyInstaller what are hiddenimports and hooks?

戏子无情 提交于 2019-12-31 01:01:34
问题 I recently tried pyInstaller and there are some things i don't quite get. i have been trying to create some executables (NOTE: all of them use numpy, scipy, OpenCV, BLAS etc) but i have been failing. There is always something missing. So my question is, can someone explain better to me what are hiddenimports and hooks, and how can i tell pyInstaller the directories of all the dependencies in my code so it can pack the in the final executable. Thank you. 回答1: From the pyinstaller documentation

Location of static files when creating a Django exe using pyinstaller

天涯浪子 提交于 2019-12-30 10:33:44
问题 I have a Django project with the following structure: root videos static templates and the STATIC_URL setting in settings.py is STATIC_URL = '/static/' I managed to use pyinstaller to create a windows executable from manage.py. I can start the Django server but I can't figure out where to put the static files. When I first started the server it could not find the templates as well, it searched for them in : 'root\django\contrib\admin\templates\videos\' I copied the templates to this folder

PyInstaller very big file size

╄→гoц情女王★ 提交于 2019-12-30 04:38:08
问题 I've made simple code editor using wxPython. File size (python files) is 1.3 KB. But when I create executable using PyInstaller, I get 30 MB file ! Is there a way to decrease file size? Btw, I am not importing whole wx library, only components I need (ex from wx import Frame ). Using Linux, Fedora 18 64bit. 回答1: wxPython is a big library so when you create an executable, they tend to end up being between 20 and 30 MB. Also note that Python itself is kind of bulky because Python is an

Building Cython-compiled python code with PyInstaller

一笑奈何 提交于 2019-12-29 14:22:52
问题 I am trying to build a Python multi-file code with PyInstaller . For that I have compiled the code with Cython , and am using .so files generated in place of .py files. Assuming the 1st file is main.py and the imported ones are file_a.py and file_b.py , I get file_a.so and file_b.so after Cython compilation. When I put main.py , file_a.so and file_b.so in a folder and run it by "python main.py" , it works. But when I build it with PyInstaller and try to run the executable generated, it throws

How can I create the minimum size executable with pyinstaller?

与世无争的帅哥 提交于 2019-12-29 03:16:04
问题 I am on Windows 10, I have anaconda installed but I want to create an executable independently in a new, clean minimal environment using python 3.5. So I did some tests: TEST1: I created a python script test1.py in the folder testenv with only: print('Hello World') Then I created the environment, installed pyinstaller and created the executable D:\testenv> python -m venv venv_test ... D:\testenv\venv_test\Scripts>activate.bat ... (venv_test) D:\testenv>pip install pyinstaller (venv_test) D:

Pyinstaller setting icon

天大地大妈咪最大 提交于 2019-12-29 02:47:08
问题 I use command that: pyinstaller.exe --icon=test.ico -F --noconsole test.py All icons do not change to test.ico Some icons remain default(pyinstaller) icon... Why? all icon change OS -> windows 7 32bit, windows 7 64bit(make exe file OS) remain default icon OS -> windows 7 64bit(other PC) 回答1: I know this is old and whatnot (and not exactly sure if it's a question), but after searching, I had success with this command for --onefile : pyinstaller.exe --onefile --windowed --icon=app.ico app.py

PyInstaller fails on Windows 7: “Can't find a usable init.tcl”

无人久伴 提交于 2019-12-29 01:51:11
问题 I have a basic Python script which uses Tkinter. from Tkinter import Tk from tkFileDialog import askdirectory Tk().withdraw() print askdirectory() After compiling my script with PyInstaller, I tried to run my program on Windows 7 (64-bit) computer which didn't have Python installed. It raised this error: Can't find a usable init.tcl in the following directories: [list of directories] This probably means that Tcl wasn't installed properly Why does my script fail to find init.tcl after

Building python pylab/matplotlib exe using pyinstaller

半世苍凉 提交于 2019-12-29 01:23:06
问题 The following code runs fine and displays a simple pie chart when run as an interpreted python py program. A month ago, I used pyinstaller to create a stand-alone exe and that worked great. Recently, I decided to rebuild the exe. The pyinstaller build completes successfully without errors, but the generated exe does nothing when run. When I run it, it ends quickly without any errors and without displaying a pie chart. Something has changed since a month ago, but I can't figure out what. I've

Executable made with pyinstaller experiences “Fatal python error: initfsencoding”

感情迁移 提交于 2019-12-28 07:05:13
问题 I am able to run my python (python 3.7) program on my pc from sublime text. The program uses tkinter and sqlite3. Does pyinstaller not support them? The error I'm getting when running it (by simply double-clicking the file created in dist : Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings' If anyone has some experience with this all help will be greatly appreciated! I can post the code if the issue might be in the