Skip to content Skip to sidebar Skip to footer

No Module Named Py4j.protocol On Eclipse (pydev)

I configured Eclipse in order to develop with Spark and Python. I configured : 1. PyDev with the Python interpreter 2. PyDev with the Spark Python sources 3. PyDev with the Spark

Solution 1:

Are you able to run it from the command line? I think the first step would be taking the IDE out of the question, so, try to get everything running with the proper environment variables in the command line (maybe asking for help to the pyspark community), after that's running, try comparing the env variables you have in your run to the run in the command line (create a program which runs the env variables and run it in the console and then in the IDE to check the difference).

One note (which is probably not the issue, but still...): from your screenshot, it seems that your project configuration has /CompensationStudy added to the PYTHONPATH, yet, you seem to be putting your code in /CompensationStudy/src (so, you should edit your project configuration to only put /CompensationStudy/src in the PYTHONPATH).

Solution 2:

Had similar error.

After installing py4j, able to execute without the error

sudo pip install py4j

Post a Comment for "No Module Named Py4j.protocol On Eclipse (pydev)"