pyinstaller

PyInstaller: IOError: [Errno 2] No such file or directory:

ぃ、小莉子 提交于 2020-01-21 08:40:27
问题 I am trying to compile a python script using pyinstaller with modules like scientific,MMTK. Pyinstaller was unable to include some .pyd modules so I copied them manually in the dist folder. When I executed the compiled exe it gave me following error:- C:\Python27\hello\dist\hello>hello.exe Traceback (most recent call last): File "", line 21, in File "C:\Python27\iu.py", line 436, in importHook mod = _self_doimport(nm, ctx, fqname) File "C:\Python27\iu.py", line 521, in doimport exec co in mod

Packaging multiple scripts in PyInstaller

夙愿已清 提交于 2020-01-21 05:12:08
问题 I'm using PyInstaller to turn two scripts into one executable file, one of which calls the other. The issue I'm having is I can't figure out how to bundle the two scripts and still let them reference each other: The code that causes the issue is that one script, script1.py contains: subprocess.call(['gksudo','python script2.py']) This works fine when I run the scripts normally, but once they're packaged in PyInstaller I don't know how to make the call work. 回答1: I'm don't think pyinstaller

pyinstaller one file --no-console does not work “Fatal Error”

一曲冷凌霜 提交于 2020-01-19 06:06:44
问题 I try 2 options with pyinstaller one with console and one without. I am using Windows 10, Python 3.5.4, Windows Chrome Driver 2.33 and Selnium 3.6.0 and Pyinstaller 3.3. The one without console fails: Here is the code for Test.py #!python3 from selenium import webdriver # Chrome Proxy options and disable the Yellow Bar about Chrome being controlled by Automated Software. chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--disable-infobars") chrome_options.add_argument("-

Pyinstaller Activex Attribute Error with wxPython

旧时模样 提交于 2020-01-16 13:29:23
问题 For some reason, when I compile my app with Pyinstaller, it gives me an error when run: Traceback (most recent call last): File "<string>", line 2, in <module> AttributeError: 'module' object has no attribute 'activex' And the top of my code (the code itself is extremely long). I've also removed a whole load of arrays at the top, which contain text for the app. from wxPython.wx import * from wx import * from wx.lib.wordwrap import wordwrap import sys, os, re class CheatulousFrame(wxFrame):

Bundle data for pyinstaller error (--onefile)

不想你离开。 提交于 2020-01-16 09:06:19
问题 I want to include an image for my .exe. I'm following the directions as listed here. It says the build completes successfully in terminal. When I run the .exe it marks a fatal error in the program. Any ideas appreciated. My directory looks like /Box Tracking --/res ----amazon_box.jpg --main.py --gui.py Related code from gui.py: import tkinter as tk import main import traceback import time import random # use these libs since base tkinter can only open gif and other obscure formats # must

pyinstaller exe with pubsub

耗尽温柔 提交于 2020-01-16 01:14:12
问题 I have written a wxpython application that uses several different threads all of which need to write to the log window (textctrl box). Because of this I followed this tutorial http://www.blog.pythonlibrary.org/2010/05/22/wxpython-and-threads/ And used wx.CallAfter and PubSub. This was my original code from wx.lib.pubsub import Publisher Publisher().subscribe(self.messenger, "update") wx.CallAfter(Publisher().sendMessage, "update", "Thread finished!") def messenger(self, msg): self.logtxtctrl

Standalone kivy application fail to run on a different machine

懵懂的女人 提交于 2020-01-15 09:34:28
问题 I am new to kivy and I was able to finally finish my project and compile it into a single executable using pyinstaller and its spec file. If I try to launch it on a machine with no kivy or python installation it always fails with this error (Below). I have looked and researched amny articles but most of them assume that kivy or the path of the missing png or gstreamer to be in the PATH but my machines where I am trying to launch does not have python or kivy. Can someone please help me here?

exe generated by py2exe and pyinstaller not working

故事扮演 提交于 2020-01-15 09:16:55
问题 I wrote a screenshot program using python and wanted to compile it as .exe file. So I tried with both py2exe and pyinstaller . My python version is 2.7.14 , 32bit. I use Windows 10. I also use virtual environment in this project. My code for the screenshot program is like below. I run it by python screenshot.py and it take a screenshot of my screen and stored it inside the save directory. from PIL import Image import pyscreenshot as ImageGrab import time time.sleep(3) save_dir = "C:/Users

Errno 22:invalid mode('rb') or filename:' ' while running a spec file while using pyinstaller

旧城冷巷雨未停 提交于 2020-01-14 09:37:06
问题 This is my spec file # -*- mode: python -*- a = Analysis(['final_code.py'], pathex=['C:\\Python27\\PyInstaller-2.1\\final_code'], hiddenimports=[], hookspath=None, runtime_hooks=None) pyz = PYZ(a.pure) exe = EXE(pyz, Tree('C:\\Python27\\data_req\\'), a.scripts, exclude_binaries=True, name='final_code.exe', debug=False, strip=None, upx=True, console=False ) coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, strip=None, upx=True, name='final_code') I have modified it to include the text files

How to correctly install pyinstaller

╄→尐↘猪︶ㄣ 提交于 2020-01-14 08:36:26
问题 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