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

tags: spark

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 successfully
Note: To configure the default python as python3.6.9, the method is as follows
Delete the original python soft link:

rm /usr/bin/python 

Establish a new soft link from python to python3.6:

ln -s /usr/bin/python3.6 /usr/bin/python

Finally, I have to find the command and restart the computer to make the above soft link take effect.

effect:

3. pyspark running effect

Intelligent Recommendation

Cv2.Rectangle error TYPEERROR: An Integer IS Required (Got Type Tuple)

Announcement TypeError: An Integer Is Required (Got Type Tuple) The above operation, will occupy too much memory, operate with np.stack ((IM_B, IM_G, IM_R), AXIS = 2)...

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

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

Python: Use PyInstaller to package into an exe file, and TypeError: an integer is required (got type bytes) exception resolution

Using Python 3.6 or above to use pyinstaller for packaging will result in a TypeError: an integer is required (got type bytes) exception. The solution and installation pyinstaller tutorial are as foll...

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

[Solve Pycharm remotely running server connection error problems] Typerror: An Integer is Required (GOT TYPE BYTES)

.pycharm_helpers/third_party/thriftpy/_shaded_thriftpy/_compat.py  Use the following code to replace the original file code...

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

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

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

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

Top