python: Use PyInstaller packaged into exe files, and TypeError: an integer is required (got type bytes) exception resolution

tags: python  PyInstaller  TypeError

python: Use PyInstaller packaged into exe files, and TypeError: an integer is required (got type bytes) exception resolution
2019-11-12 15:50:22 lad. Read the article tag number 225: python package exepyinstaller more
Category Column: python
Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https: //blog.csdn.net/weixin_44096448/article/details/103031187
Packing occur TypeError pyinstaller use with python3.6 above: an integer is required (got type bytes) abnormality mounting solutions pyinstaller tutorial below:
1. Installation PyInstaller
    • pip install PyInstaller

2. PyInstaller packaging commands commonly used parameters are as follows:
• -F: Python packaged into a single executable program
• -D: Python program package to a folder
• -i: generation icon, applies only to Windows platforms (ps: -i parameter must be connected after the end of the .ico icon file)
• -n: Specifies the name of a file package generated
• -w: ban pop-up command line
3. Packaging single file py
    • PyInstaller -F xxx.py

4. The results appear abnormal TypeError: an integer is required (got type bytes), Solutions, enter the following command:
    • pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Please update unusual pip, then enter the command to install pyinstaller
    • python -m pip install --upgrade pip
5. PyInstaller again performed successfully packaged -F xxx.py

6. The directory structure looks like, exe executable file directory dist

 
7. perfect solution TypeError: an integer is required (got type bytes) exceptions, PyInstaller complete package.

 

 

 

Other Description: If there are multiple versions of the computer python at the same time may cause a variety of problems (for example, "failed to execute script xxx", "failed to create process"), if not particularly familiar with the python just to occasionally use the best words the extra python previously installed version to delete all deleted or re-install (the official website to download the latest installer, the internet, said the 32-bit compatibility is better)
————————————————
 

From <https://blog.csdn.net/weixin_44096448/article/details/103031187>

Intelligent Recommendation

TypeError: an integer is required (got type bytes) error correction method of seeking correction

TypeError: an integer is required (got type bytes) error correction method of seeking correction Traceback (most recent call last): File “F:/python/automatic/tsTserv.py”, line 18, in tcpCl...

"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...

More Recommendation

TypeError: an integer is required (got type str)? Solution

Code: An error was encountered when opening files The following code changes to solve the problem The specific reasons unknown, seeking answers to big brother...

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...

Python files are packaged as exe with pyinstaller with icons

Because Python will often use to write scripts, it will be a lot easier to make exe, so check it and use pyinstaller. Cmd + R enter command line input After the installation is successful, cd to the d...

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

Top