FAQ Database Discussion Community


Py2Exe lost sys.stdin error?

python,python-3.x,py2exe
I have a very simple script, that creates a file as big as the user wants: from uuid import uuid4 global ammount ammount = None def randbyte(): l = [] a = uuid4().hex for char in a: l.append(str(char)) return l[6] def randkb(): a = '' for num in range(0, 32):...

How to digitally sign a binary produced with py2exe?

python,code-signing,py2exe,codesign,code-signing-certificate
I use py2exe 0.9.2.2 to pack all my python script into a Windows binary. I'm trying to apply a code sign to the binary. Using signtool directly produces a broken binary. Is it possible to sign a binary produced with py2exe? How?...

How to pass values to a Python executable from a config file

python,py2exe
I have created a Python executable using Py2exe. My python script pick values from a config file,but when i compile the script as an executable the values are hardcoded. Is there a way where i can still use my config file to feed values to my executable. MyPythonScript driver =...

Using third-party library in py2exe single EXE file

python,dll,py2exe,autoit
I'm making some script files in Python 2.7.9 and additionally use a third-party library, pyautoit 0.4. I would like to make my scripts as a single EXE (want to run in single file so they don't need to setup files) and by using py2exe, tried this: # -*- coding: utf-8...

Import modules after compilation with py2exe

python,windows,py2exe
I compiled a python executable with py2exe and want to import a python module by a user input. userinput = input("Enter module name") module = __import__(userinput) Does this work? Or is there another way to import a module after the file is compiled?...

python 3.4 py2exe is not working or doing anything

python,pip,py2exe,distutils
I am trying to run a python file that I create as an executable or .exe in windows. I want to run this code in another computer that does not have nor need python, or pyserial or PIL or any other software, My code creates a Gui that do stuff...

How do i convert my Python script (that has imported modules) to a windows exe?

python,py2exe,cx-freeze
Here are the import modules that my script uses : import datetime from dateutil import parser from tkinter import filedialog import tkinter import mailbox import pprint import json import urllib.request from tkinter import * #my script code here How can i convert it into a windows exe. Im using python...

convert python script to exe in windows 7 32bit using py2exe

python-2.7,exe,mysql-python,py2exe
I have python script that have different modules like : MYSQLdb (update.py) Python Script: import fileinput import sys import os import re import subprocess import MySQLdb ############################################################################# # **DB Functions::: def fetch_pn (host,username,password,db_name): # Open database connection db = MySQLdb.connect(host,username,password,db_name) # prepare a cursor object using cursor() method cursor =...

__file__ not present when using py2exe [duplicate]

python,py2exe
This question already has an answer here: how can i get the executable's current directory in py2exe? 3 answers I finally got my basemap plot to compile after much fiddling, but I'm getting an error still due to the way I'm using the os module to walk over the...

python socket doesn't work after restart application

python,sockets,py2exe
I have a python script server->client, and for some reasons i used py2exe to make an exe from py so i can use on machines without python installed. And i have and update system: I send command update to server and server start a bat file: suprocess.Popen("C:/Server/server.bat", shell=False) # and...

Python project to exe

python-2.7,executable,py2exe
I've been working on a rather large Python project containing both downloaded packages (xlwt, xlrd etc. ) and user defined packages and I'd like to pack it into a single .exe file. I've been searching, but can't seem to find something on how to make an executable from such a...

No module named flask.ext.wtf when building with py2exe

python,exe,py2exe,flask-wtforms
On a Windows 8.1 machine with Python 2.7, I try to make a flask-script executable using py2exe. The script itself runs perfectly, but not so the compiled .exe. This is setup.py: from distutils.core import setup import py2exe setup(console=['app.py'], options={ 'py2exe': {'includes': ['flask']} } ) Starting app.exe from the command, I...

How to prevent unnecessary imports with py2exe?

python,numpy,pandas,py2exe
I have a console script that includes the following import statements: import pandas as pd from time import time from datetime import date, datetime, timedelta import numpy as np import sys I'm trying to create a Windows executable for this script using py2exe, but having some trouble, as it seems...

python 3 how to put pics inside my program

image,python-3.x,qt5,py2exe
I have a program and couple of pics which I use in the program. icon.addPixmap(QtGui.QPixmap("logo_p3.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.label_6.setPixmap(QtGui.QPixmap("Logo-4.jpg")) Pics are in the same folder with the program. Is there any way to put pics INSIDE the program? (While they are just in the folder they can be easily changed or...

Run pythons as .exe files without python installed

python,py2exe
I'm trying to run a python file on a system without python installed. I'm using py2exe, which gives me a .pyc file which runs fine on my system, but when I give it to a friend without python it tells him Windows can't run the file. My setup.py file contains...

cmd/DOS window opens with GUI created with py2exe

python,user-interface,cmd,py2exe,pyqt5
I have created a GUI using PyQt5. The aim of the GUI is to pass some input data (images, shapefiles etc) and to use them in softwares (GIS mostly). To launch the GIS I use the subprocess.Popen command line. I have used py2exe to create my app and my problem...

OMP warning when numpy 1.9.2+MKL is packaged with py2exe

python,numpy,py2exe
I get the following warning when i package my python application using py2exe to a single exe OMP: Warning #178: Function GetModuleHandleEx failed: OMP: System error #126: The specified module could not be found. is there a way to hide the warning or to fix the issue. A similar issue...

python 3.4 py2exe image.open cannot find the images

python,image,tkinter,exe,py2exe
I am trying to create an executable file of my GUI (which uses 12 images from my computer) but when I create it, the .exe does not run in another computer because it cannot find those 12 images I have a tree like this project (folder) --mycode.py (python file) --setup.py...

Tkinter images in py2exe process

python,image,tkinter,py2exe
I'm writing a widget with tkinter to emulate some search bars ( like google / champion select etc . ) within the widget there are some images. These images are in the same folder where I have my file .py and their path is C:\Users\HANZO\Desktop\tools\google.gif etc . till here the...

.exe Icon Doesn't Change [py2exe]

python,python-2.7,icons,py2exe
My icon file myicon.ico in same directory with setup.py. When I run py2exe, myproject.exe doesn't have icon. I looked for solution but couldn't find. setup.py code is: from distutils.core import setup import py2exe setup( windows=[{ "script": "myproject.py", "icon_resources": [(0, "favicon.ico")], }] ) OS: Win8.1 64bit...