pyinstaller

Python type error AFTER compiling to .exe

喜夏-厌秋 提交于 2020-12-26 05:14:56
问题 I have this python 3 project, running perfectly when I run it from my pycharm IDE. However when I compile it to an .exe I get an type error when executing a certain line?? I compile to exe using pip and pyinstaller. command used: pyinstaller --onefile gui.py *ERROR I GET when executing the .exe: Traceback (most recent call last): File "tkinter\__init__.py", line 1705, in __call__ File "gui.py", line 37, in clicked File "passmarkDriver.py", line 48, in runPassmarkTest TypeError: a bytes-like

python从入门到放弃

情到浓时终转凉″ 提交于 2020-12-26 02:04:40
01 计算机基础及python介绍 1、计算机基础 2、编程语言及python介绍 3、python2与python3的区别 4、PEP8 python编码规范 02 python入门基本语法 1、python入门语法 2、流程控制 03 数据类型及内置方法 1、数字类型 2、字符串类型 3、列表类型 4、元组类型 5、字典类型 6、集合 04 字符编码及文件处理 1、字符编码 2、深浅拷贝 3、文件处理 05 函数 1、函数的基本使用 2、函数的参数 3、函数对象 4、函数嵌套、名称空间及作用域 5、闭包函数 6、装饰器 7、迭代器 8、生成器 9、三元表达式、列表生成式与生成器表达式 10、面向过程编程 11、匿名函数与内置函数 12、函数递归 13、常见内置方法 06 模块与包 1、模块与包 2、软件开发目录规范 07 常用模块 1、turtle模块 2、time模块 3、pyinstaller模块 4、jieba模块 5、wordcloud模块 6、datetime模块 7、random模块 8、os模块 9、sys模块 10、hashlib模块 11、pickle模块 12、json模块 13、collections模块 14、openpyxl模块 15、subprocess模块 16、re模块 17、logging模块 项目1:ATM+购物商城 ATM+购物商城 08

Install Python 3 on Cloudready/Chromium/Chrome OS without installing Linux containers/environments

这一生的挚爱 提交于 2020-12-23 12:56:33
问题 Recently I installed Neverware's version of Chromium OS, called Cloudready, on VirtualBox 6.1, to develop Python apps for Chromebooks. This version of Chromium OS is 48.0.2564.116 developer build (newer versions won't install due to graphics incompatibilities). As I do not have a Google Account, I login into Chromium OS as Guest user (somehow I have administrative powers as Guest, which is good for my developmental purposes). I found that Python 2.7.3 was preinstalled. I tried to install

How to prevent exe created by pyinstaller from being deleted by Antivirus?

无人久伴 提交于 2020-12-14 06:25:22
问题 I have converted a python project into an exe file using pyinstaller. The basic functionality in the python project is to read files, parse the file contents, and write them into an excel document. The exe file works perfectly fine in my system as I have generated, but when I distribute this exe file to other systems, McAfee antivirus deletes the exe file by displaying the message as "Access denied" . How to handle this situation? I have tried both the commands for pyinstaller and also the

How to prevent exe created by pyinstaller from being deleted by Antivirus?

喜你入骨 提交于 2020-12-14 06:24:28
问题 I have converted a python project into an exe file using pyinstaller. The basic functionality in the python project is to read files, parse the file contents, and write them into an excel document. The exe file works perfectly fine in my system as I have generated, but when I distribute this exe file to other systems, McAfee antivirus deletes the exe file by displaying the message as "Access denied" . How to handle this situation? I have tried both the commands for pyinstaller and also the

How to get python console logs on my tkinter window instead of a CMD window while executing an exe file created using pyinstaller

a 夏天 提交于 2020-12-13 03:18:17
问题 Problem statement I have created a python 3.6 script that performs some data conversion and uses tkinter for GUI (folder selection and other options). I have converted this to an exe file using pyinstaller & would like other users (who don't have python installed) to be able to use the tool. However, when I open the exe , it opens a CMD window which shows the logs usually shown on the python console . I'd like to get this redirected to a text box or frame in my tkinter window itself - instead

Python(00):PyInstaller库,打包成exe基本介绍

大憨熊 提交于 2020-12-12 09:45:47
一、pyinstaller简介 Python是一个脚本语言,被解释器解释执行。它的发布方式: .py文件:对于开源项目或者源码没那么重要的,直接提供源码,需要使用者自行安装Python并且安装依赖的各种库。(Python官方的各种安装包就是这样做的) .pyc文件:有些公司或个人因为机密或者各种原因,不愿意源码被运行者看到,可以使用pyc文件发布,pyc文件是Python解释器可以识别的二进制码,故发布后也是跨平台的,需要使用者安装相应版本的Python和依赖库。 可执行文件:对于非码农用户或者一些小白用户,你让他装个Python同时还要折腾一堆依赖库,那简直是个灾难。对于此类用户,最简单的方式就是提供一个可执行文件,只需要把用法告诉Ta即可。比较麻烦的是需要针对不同平台需要打包不同的可执行文件(Windows,Linux,Mac,...)。 本文主要就是介绍最后一种方式,.py和.pyc都比较简单,Python本身就可以搞定。将Python脚本打包成可执行文件有多种方式,本文重点介绍PyInstaller。 PyInstaller的原理简介 PyInstaller其实就是把python解析器和你自己的脚本打包成一个可执行的文件,和编译成真正的机器码完全是两回事,所以千万不要指望成打包成一个可执行文件会提高运行效率,相反可能会降低运行效率

Python - pygame error when executing exe file

百般思念 提交于 2020-12-09 04:33:06
问题 So, I'm working on a little project for myself, using pygame and tkinter to build an mp3 player. Everything works when running the program using visual studio, but when I turned the program to an .exe file using pyinstaller and tried to run in, the following appeared: pygame.mixer.load(song) pygame.error Failed to execute script I've tried everything, but it keeps telling me the same. Here you can see how I call the song: pygame.init() pygame.mixer.init() song = path + '\music\\' + selected

Python - pygame error when executing exe file

放肆的年华 提交于 2020-12-09 04:30:53
问题 So, I'm working on a little project for myself, using pygame and tkinter to build an mp3 player. Everything works when running the program using visual studio, but when I turned the program to an .exe file using pyinstaller and tried to run in, the following appeared: pygame.mixer.load(song) pygame.error Failed to execute script I've tried everything, but it keeps telling me the same. Here you can see how I call the song: pygame.init() pygame.mixer.init() song = path + '\music\\' + selected

Accessing Python interpreter from a PyInstaller bundle

吃可爱长大的小学妹 提交于 2020-12-09 03:46:28
问题 I have a program (suppose it is called "PROG") that spawn Pronsole.py (3D Printing). If it is just interpreted by Python, it works good in GNU/Linux and Windows. This is the line that works: self.pronTranspProc=reactor.spawnProcess(self.pronProtProc, pythonPath, [pythonPath, "pronsole.py"], os.environ, self.pronPathPrintrun) When Python is the normal interpreter, "pythonPath" will be just the path to that interpreter, since it is sys.executable. But when a bundle is made with Pyinstaller so