pyinstaller

How to correctly install pyinstaller

非 Y 不嫁゛ 提交于 2020-01-14 08:36:09
问题 I have attempted to install pyinstaller (on Ubuntu 16.0.4) using pip: pip3 install pyinstaller Collecting pyinstaller Using cached PyInstaller-3.2.tar.gz Collecting setuptools (from pyinstaller) Using cached setuptools-25.1.3-py2.py3-none-any.whl Building wheels for collected packages: pyinstaller Running setup.py bdist_wheel for pyinstaller ... done Stored in directory: /home/.../.cache/pip/wheels/fc/b3/10/006225b1c1baa34750a7b587d3598d47d18114c06b696a8e0e Successfully built pyinstaller

Pyinstaller - Calling GDAL from os.system (gdal_translate)

随声附和 提交于 2020-01-13 20:20:20
问题 Greetings learned fellows. Running 32bit Python2.7 on Windows 7. I'm have a question regarding including GDAL executables in a pyinstaller build. I am making a system call to run two GDAL functions from the FWTools release. These functions are in the PATH variable on windows C:\Program Files (x86)\FWTools2.4.7\bin and so it runs fine from the Python27 environment. However, this path is not carried over to the pyinstaller build. The code in question is calling a GDAL function to re-translate

Pyinstaller - Calling GDAL from os.system (gdal_translate)

折月煮酒 提交于 2020-01-13 20:18:48
问题 Greetings learned fellows. Running 32bit Python2.7 on Windows 7. I'm have a question regarding including GDAL executables in a pyinstaller build. I am making a system call to run two GDAL functions from the FWTools release. These functions are in the PATH variable on windows C:\Program Files (x86)\FWTools2.4.7\bin and so it runs fine from the Python27 environment. However, this path is not carried over to the pyinstaller build. The code in question is calling a GDAL function to re-translate

Pyinstaller generated exe doesn't work properly

元气小坏坏 提交于 2020-01-13 13:45:14
问题 I'm trying to package a python program/script (pastebin link) I wrote which includes a GUI using the tkinter module. I decided to use Pyinstaller and according to them it supports Python 3.7. Currently, trying to run pyinstaller seems to generate no issues when actually packaging. It is after when I try to run the executable that it fails. One I generate a one file variant of the executable, it simply opens a command prompt and hangs. When I do the non one file command, it opens and closes

NSUserNotificationCenter.defaultUserNotificationCenter() returning None using PyInstaller

早过忘川 提交于 2020-01-13 13:35:11
问题 I am trying to put notification to notification centre (Mac OSX) I am using PyObjC bindings to use cocoa api's from our python application. I am using following code snippet : import Foundation¬ import objc¬ NSUserNotification = objc.lookUpClass('NSUserNotification')¬ NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')¬ notification = NSUserNotification.alloc().init()¬ notification.setTitle_("TestTitle")¬ notification.setInformativeText_("This is sample text")¬ center =

Pyinstaller not picking up Tree or Data files

别来无恙 提交于 2020-01-13 11:08:31
问题 I'm trying to build a very basic python script with pyinstaller: print 'hello world!' and I'm trying to make a data file OR a directory of data files available to the binary. I've read the documentation over and over, I've tried building with 1.5, 2.0, and the dev build of 2.0, I've tried building with --onefile AND --onedir, I've tried building on OS X and Linux, but for some reason the datafile/tree statements in my .spec file seem to be ignored. Here are some .spec file variations I've

Importing Python modules from a select location

[亡魂溺海] 提交于 2020-01-12 15:54:06
问题 Let’s say I had three scripts. Main.py (has all imports), 1.py (random script), 2.py (random script). pyinstaller -F --onedir Main.py (80mb) pyinstaller -F --onedir 1.py (80mb) pyinstaller -F --onedir 2.py (80mb) This creates 3 folders I then copy 1.exe and 2.exe to Main folder with all dependencies and this runs fine. Two issues are present: The issue is the size. One file reduces this to 30mb, one folder keeps it at 80mb More importantly, the exe’s are unable to leave that folder. I’ve had

How to make pyinstaller not use anaconda and build a small-size exe file

孤人 提交于 2020-01-11 14:41:21
问题 I have been trying to build .exe file using pyinstaller in windows 10. It worked, but the size of the exe file is ~212 MB, even by using a venv (as in here). I thought it might be because I am using python by anaconda! Then I installed a separate version of Python so not to use anaconda! But it did not work (still large file). Then I uninstalled anaconda to test it. Pyinstaller is still trying to access Python in 'C:\Program Files\anaconda3\python.exe' ( this error : No Python at 'C:\Program

FileNotFoundError: [Errno 2] No such file or directory: .constants.json

强颜欢笑 提交于 2020-01-11 11:32:50
问题 I have coded a python script involving excel sheet manipulation using openpyxl . Script is running fine using python interpreter. Once I have made single windows executable using pyinstaller and running the program, its throwing error: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\....\\AppData\\Local\\Temp\\_MEI31842\\.constants.json' Any suggestion? 回答1: You might need to tell PyInstaller to include this file: Put a file hook-openpyxl.py in the directory from where you

FileNotFoundError: [Errno 2] No such file or directory: .constants.json

懵懂的女人 提交于 2020-01-11 11:32:30
问题 I have coded a python script involving excel sheet manipulation using openpyxl . Script is running fine using python interpreter. Once I have made single windows executable using pyinstaller and running the program, its throwing error: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\....\\AppData\\Local\\Temp\\_MEI31842\\.constants.json' Any suggestion? 回答1: You might need to tell PyInstaller to include this file: Put a file hook-openpyxl.py in the directory from where you