pyInstaller packaged into exe and TypeError: an integer is required (got type bytes) solution

tags: python

  1. pyinstaller installation
pip install pyInstaller
  1. Commonly used PyInstaller packaging command parameters are as follows:
  • F: Package Python program as a single executable file
  • D: Package the Python program as a folder
  • i: generate icon, only applicable to Windows platform (the -i parameter must be followed by an icon file ending in .ico
  • n: Specify the name of the generated file after packaging
  • w: prohibit command line popup
  1. Package a single py file
pyInstaller -F xxx.py

  1. If there is an abnormality in the figure, if there is an abnormal update, please update pip, and then install the following file
python -m pip install --upgrade pip
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
  1. Run again successfully
  2. exe file location, dist directory under the same directory as the py file being run

Intelligent Recommendation

"TypeError: an integer is required (got type bytes)" error when trying to run pyspark after installing spark 2.4.4

The environment is Ubuntu, jdk8, spark-2.4.5-bin-hadoop2.7, python3.8.2 1. Reason Since spark does not yet support python3.8 2. Solution So just downgrade python, I downgrade to python3.6.9 successful...

Pycharm: Error TypeError: an integer is required (got type bytes) after setting Anaconda

Background: After installing the latest version of Anaconda 3.9, after setting Python Interpreter in Pycharm to python.exe under the latest version of Anaconda file, the console fails to start and an ...

Python3.8 uses scikit-learn0.20.2 Times Wrong Typeerror: an Integer is Required (got type bytes)

I must record this problem, because I have gone too much road, spend too much time! Problem Description: When the brother's project is placed on his computer, no module name 'error appears, after seve...

When importing the Sklearn library, encounter TypeError: an integer is required (got type bytes)

When importing the Sklearn library, encounter TypeError: an integer is required (got type bytes) First check your Sklearn version, when you install Sklearn, if you use the following PIP command, you m...

【Python】TypeError: an integer is required (got type str)

Problems encountered in debugging code today TypeError: an integer is required (got type str) problem causes In the open function of the open file object in python3, the following is the wrong way of ...

More Recommendation

TypeError: an integer is required (got type str)

This is type alone What is needed is an int type, but input is a STR type  ...

TypeError: an integer is required (got type is tuple)

TypeError: an integer is required (got type is tuple), This error. To understand it literally, you need to obtain a integer data, and the original code is the tuple. What needs to be done is to change...

Pycharm, the solution to use Python Cyperror: An Integer Is Required (GOT TYPE BYTES) (Python3.8)

Solution, I will not copy it anymore refer toPycharm, use Python Cyperror: An Integer Is Required (GOT TYPE BYTES) solution (python3.8) _WWWWHY_ Blog-CSDN blog Before after   Can use console norm...

RandomResizedCrop error: TypeError: an integer is required (got type tuple)

Problem background The blogger’s version of pytorch is 0.4.1, and the version of torchvision is 0.2.1, an error occurs when the following code is executed. See the error below: Question inquiry ...

cv2.rectangle--TypeError: an integer is required (got type tuple)

Framed the face on the picture, the following error appeared: Haven't encountered it before, instackoverflowI found the explanation above, which is the reason why the image read by PIL.Image cannot us...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top