Skip to content

ModuleNotFoundError: No module named 'pyspark' #6346

Answered by Pythoneryeah
Pythoneryeah asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you. I solved the problem. But still don't know why? Here's my solution:
1, the mkdir ~ /. Ipython/kernels/pyspark
2, vim ~ /. Ipython/kernels/pyspark/kernel. The json
3. Add the following:
{
"display_name": "pySpark",
"language": "python",
"argv": [
"/usr/local/anacond/bin/python3",
"-m",
"IPython.kernel",
"-f",
"{connection_file}"
].
"env": {
"SPARK_HOME": "/usr/local/spark",
"PYTHONPATH" : "/ usr/local/spark/python: / usr/local/spark/python/lib/py4j - 0.10.4 - SRC. Zip",
"PYTHONSTARTUP": "/usr/local/spark/python/pyspark/shell.py ",
"PYSPARK_SUBMIT_ARGS": "pyspark-shell"
}
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Pythoneryeah
Comment options

Answer selected by code-asher
@code-asher
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants