pyinstaller

How to convert a python project into an executable file with all additional scripts?

余生颓废 提交于 2020-06-22 04:15:30
问题 I know there have been a bunch of questions already asked regarding this but none of them really helped me. Let me explain the whole project scenario so that I provide a better clarity to my problem. The directory structure is somewhat like this shown below: Project Directory Layout I need to convert this whole GUI based project (The main file is using Tkinter module to create GUI) into main.exe which I can share with others while making sure that all the additional files work exactly the

Pyinstaller, NameError: global name 'quit' is not defined

*爱你&永不变心* 提交于 2020-06-12 04:25:12
问题 I have a python script which runs just fine, however after running pyinstaller, I get the following when I use a quit() or exit() command: Makespec file: # -*- mode: python -*- a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'), os.path.join(HOMEPATH,'support/useUnicode.py'), 'icinga.py'], pathex=['/home/user/projects/icinga_python/releases/onefile_v1.0']) pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name=os.path.join('dist', 'icinga'), debug=False,

How do I use UPX with pyinstaller?

折月煮酒 提交于 2020-06-11 17:09:09
问题 How do I use UPX with pyinstaller? I am following the docs. I have downloaded UPX. My file looks like: import csv import selenium import pandas print('Hello') I then run: pyinstaller -F --upx-dir C:\Users\DD\Downloads\upx394w\upx394w\123\upx308w\upx.exe zz.spec This does not affect the size of the file. Any idea how I can get this to work? # -*- mode: python -*- block_cipher = None a = Analysis(['zz.py'], pathex=['C:\\Users\\DA\\13\\14'], binaries=[], datas=[], hiddenimports=[], hookspath=[],

Pyinstaller ; ModuleNotFoundError: No module named 'sklearn.utils._cython_blas'

余生颓废 提交于 2020-06-09 13:49:20
问题 I have this import list for my python project: import pandas as pd import time import sqlalchemy from sklearn.ensemble import RandomForestClassifier import pandas as pd import numpy as np from sqlalchemy import Column, String, Float, Integer, SmallInteger, MetaData from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker And this spec file for distribution of the project: import sys sys.setrecursionlimit(5000) block_cipher = None a = Analysis([

Pyinstaller ; ModuleNotFoundError: No module named 'sklearn.utils._cython_blas'

安稳与你 提交于 2020-06-09 13:46:54
问题 I have this import list for my python project: import pandas as pd import time import sqlalchemy from sklearn.ensemble import RandomForestClassifier import pandas as pd import numpy as np from sqlalchemy import Column, String, Float, Integer, SmallInteger, MetaData from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker And this spec file for distribution of the project: import sys sys.setrecursionlimit(5000) block_cipher = None a = Analysis([

Pyinstaller ; ModuleNotFoundError: No module named 'sklearn.utils._cython_blas'

一个人想着一个人 提交于 2020-06-09 13:43:03
问题 I have this import list for my python project: import pandas as pd import time import sqlalchemy from sklearn.ensemble import RandomForestClassifier import pandas as pd import numpy as np from sqlalchemy import Column, String, Float, Integer, SmallInteger, MetaData from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker And this spec file for distribution of the project: import sys sys.setrecursionlimit(5000) block_cipher = None a = Analysis([

How to add static(html, css, js) files in pyinstaller to create standalone exe file?

拥有回忆 提交于 2020-06-09 05:39:27
问题 I'm using QtWebEngineWidgets , QtWebChannel to create PyQt5 application, which uses HTML, CSS, JavaScript. It's working fine, when we run in general way i.e., python main.py Importing HTML as below, current_dir = os.path.dirname(os.path.realpath(__file__)) filename = os.path.join(current_dir, "index.html") url = QtCore.QUrl.fromLocalFile(filename) Importing CSS, JavaScript files as below, # in index.html <link rel="stylesheet" href="styles.css"> <script type="text/javascript" src="jquery.js">

Error compiling with pyinstaller, “Error loading python38.dll”

China☆狼群 提交于 2020-06-01 07:40:28
问题 I am compiling my first GUI Application, I am using pyinstaller because it is the one I know, it generates the .exe file. I am using Python 3.8.1 (tags / v3.8.1: 1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on win32 on AMD 64Bits. from tkcalendar import Calendar, DateEntry from tkinter.ttk import * from tkinter import messagebox from tkinter import * import datetime import sqlite3 Then when I go to run the exe file I get this error, please, can you tell me what it refers to or

File size increased after making very small changes to code and compiling with pyinstaller

回眸只為那壹抹淺笑 提交于 2020-06-01 05:09:11
问题 I had just finished coding coding a small project. This same project which i had coded earlier was 6 Mb in .exe after using pyinstaller but in the latest iteration of code i had made very little changes. Now the the file size of the .exe is 307Mb after i have compiled with pyinstaller. My question is, what could have caused this drastic increase in file size? I am looking for any possible explanation. These are the imports i am using: import pdfkit import datetime as date import calendar

Path error in PySide2 application after packaging with PyInstaller

末鹿安然 提交于 2020-05-30 08:12:27
问题 I'm trying to package a PySide2 test application with the following structure: . ├── main.py ├── main.spec └── wizardUI ├── 10.toolBoxBtns.ui ├── 11.toolBoxShrCt.ui ├── 12.propertyBox.ui ├── 13.printing.ui ├── 14.settings.ui ├── 15.coclusion.ui ├── 1.welcomePage.ui ├── 2.graphicsScene.ui ├── 3.graphicsSceneText.ui ├── 4.textDialog.ui ├── 5.codeDialog.ui ├── 6.graphicsSceneBox.ui ├── 7.graphicsScenePixmap.ui ├── 8.graphicsSceneShrCt.ui ├── 9.toolbox.ui └── wizard.py When I try to run an