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

Chris :

I've installed OpenJDK 13.0.1 and python 3.8 and spark 2.4.4. Instructions to test the install is to run .\bin\pyspark from the root of the spark installation. I'm not sure if I missed a step in the spark installation, like setting some environment variable, but I can't find any further detailed instructions.

I can run the python interpreter on my machine, so I'm confident that it is installed correctly and running "java -version" gives me the expected response, so I don't think the problem is with either of those.

I get a stack trace of errors from cloudpickly.py:

Traceback (most recent call last):
  File "C:\software\spark-2.4.4-bin-hadoop2.7\bin\..\python\pyspark\shell.py", line 31, in <module>
    from pyspark import SparkConf
  File "C:\software\spark-2.4.4-bin-hadoop2.7\python\pyspark\__init__.py", line 51, in <module>
    from pyspark.context import SparkContext
  File "C:\software\spark-2.4.4-bin-hadoop2.7\python\pyspark\context.py", line 31, in <module>
    from pyspark import accumulators
  File "C:\software\spark-2.4.4-bin-hadoop2.7\python\pyspark\accumulators.py", line 97, in <module>
    from pyspark.serializers import read_int, PickleSerializer
  File "C:\software\spark-2.4.4-bin-hadoop2.7\python\pyspark\serializers.py", line 71, in <module>
    from pyspark import cloudpickle
  File "C:\software\spark-2.4.4-bin-hadoop2.7\python\pyspark\cloudpickle.py", line 145, in <module>
    _cell_set_template_code = _make_cell_set_template_code()
  File "C:\software\spark-2.4.4-bin-hadoop2.7\python\pyspark\cloudpickle.py", line 126, in _make_cell_set_template_code
    return types.CodeType(
TypeError: an integer is required (got type bytes)
John :

This is happening because you're using python 3.8. The latest pip release of pyspark (pyspark 2.4.4 at time of writing) doesn't support python 3.8. Downgrade to python 3.7 for now, and you should be fine.

Cet article est collecté sur Internet, veuillez indiquer la source lors de la réimpression.

En cas d'infraction, veuillez [email protected] Supprimer.

modifier le
0

laisse moi dire quelques mots

0commentaires
connexionAprès avoir participé à la revue

Articles connexes

Pyspark: TypeError: int is required...got type column

Comment réparer l'erreur `` TypeError: un entier est requis (got type bytes) '' lorsque vous essayez d'exécuter pyspark après l'installation de Spark 2.4.4

How is a integer mapped to 4 bytes? How to convert 4 bytes into integer in python

Pack/Unpack 4 bytes into Integer

TypeError: a bytes-like object is required, not 'str' when trying to write in csv file

TypeError: a bytes-like object is required, not 'str' but type shows bytes

Invalid single-table inheritance type: Error when TRYING to set a STI subclass in Rails 4

How is this 4 bytes?

How to resolve Json Error: TypeError: a bytes-like object is required, not 'str'

how do you fix this error when trying to initialize an arraylist?

googleapis/python-bigquery:Client.load_dataframe_to_table 失敗並顯示 PyArrow“TypeError: an integer is required (got type str)”

Python trying to randomly select the value from list within a list results in the TypeError: list expected at most 1 argument, got 4

How to fix slf4j error in WebLogic deploy

How to fix error when installing libjpeg in M1 MacBook Pro?

Keras error in Dense layer, expected 4 dimensions got array with shape (1024,2)

Got compile error when trying to invoke function pointer to member functions

How to fix "TypeError at /orders/create/ argument of type 'DeferredAttribute' is not iterable" when using Django Payment Gateway (Paytm)

Unexpected symbol error when trying to run a function

How to fix connectex error when trying to access SQL Server instance on Cloud SQL using SSMS via Proxy

How do I fix CORS Error when Trying to fetch data from SERP API into my react app

How to resolve Typescript type error in Firebase Functions after installing @google-cloud/storage

How to fix VBA "Compile Error: Object Required" error with setting dim?

How to rotate the last 4 bytes of an array?

Keras Error when checking input: expected input_4 to have shape (299, 299, 3) but got array with shape (64, 64, 3)

How to fix a VBA "type mismatch" error after switching to 64-bit Excel

How to fix "error: the following arguments are required: -i/--image"

How to fix error with pyinstaller after compilation in exe

Uncaught type error :How to fix jQuery conflict?

got an error while installing pyodbc in virtual enviornment

TOP liste

  1. 1

    Filtrer le dataframe basé sur plusieurs colonnes d'un autre dataframe

  2. 2

    Laravel SQLSTATE [HY000] [1049] Base de données inconnue 'previous_db_name'

  3. 3

    Enregistrer le chemin de l'image de la galerie vers la base de données de la salle et l'afficher dans la liste des recycleurs

  4. 4

    Comment afficher du texte au milieu de div avec une couleur d'arrière-plan différente?

  5. 5

    Microsoft.WebApplication.targets

  6. 6

    Comment changer le navigateur par défaut en Microsoft Edge pour Jupyter Notebook sous Windows 10 ?

  7. 7

    Échec de l'exécution de 'insertBefore' sur 'Node': le paramètre 1 n'est pas de type 'Node'

  8. 8

    Empêcher l'allocation de mémoire dans la génération de combinaison récursive

  9. 9

    Comment analyser un fichier avec un tableau d'objets JSON en utilisant Node.js?

  10. 10

    comment afficher un bouton au-dessus d'un autre élément ?

  11. 11

    Comment centrer un div tout en utilisant la transition et transformer avec l'échelle

  12. 12

    Filtrer les données en fonction des conditions d'une trame de données

  13. 13

    ESP8266 HADRWARE MINUTERIE, USA pour cocher une macro étrange

  14. 14

    Comment définir du texte dans un QLabel et afficher les caractères '<>'?

  15. 15

    System.Data.SqlClient.SqlException: 'Nom de colonne non valide' ApplicationRoleId '.'

  16. 16

    Pourquoi Phantomjs ne fonctionne pas avec ce site ?

  17. 17

    Stop jQuery execution after one time execution

  18. 18

    Concaténer des variables dans ansible

  19. 19

    Comment calculer la probabilité du graphique de densité?

  20. 20

    php ajouter et fusionner des données de deux tables

  21. 21

    Redirection HTTP vers HTTPS dans Java à l'aide de HTTPURLConnection

chaudétiquette

Archive