我正在考虑将 Apache Toree 用作 Jupyter 的 Pyspark 内核
https://github.com/apache/incubator-toree
但是它使用的是旧版本的 Spark(1.5.1 与当前的 1.6.0)。我在这里尝试使用这种方法 http://arnesund.com/2015/09/21/spark-cluster-on-openstack-with-multi-user-jupyter-notebook/通过创建 kernel.js
{
"display_name": "PySpark",
"language": "python",
"argv": [
"/usr/bin/python",
"-m",
"ipykernel",
"-f",
"{connection_file}"
],
"env": {
"SPARK_HOME": "/usr/local/Cellar/apache-spark/1.6.0/libexec",
"PYTHONPATH": "/usr/local/Cellar/apache-spark/1.6.0/libexec/python/:/usr/local/Cellar/apache-spark/1.6.0/libexec/python/lib/py4j-0.9-src.zip",
"PYTHONSTARTUP": "/usr/local/Cellar/apache-spark/1.6.0/libexec/python/pyspark/shell.py",
"PYSPARK_SUBMIT_ARGS": "--master local[*] pyspark-shell"
}
}
但是,我遇到了一些问题:
/jupyter/kernels
我的 Mac 中的路径。所以我最终创建了这条路径 ~/.jupyter/kernels/pyspark
.我不确定这是否是正确的路径。 PySpark
在 Jupyter 中显示为内核。 我错过了什么?
最佳答案
Jupyter 内核应该放在 $JUPYTER_DATA_DIR 中。在 OSX 上,这是 ~/Library/Jupyter。见:http://jupyter.readthedocs.org/en/latest/system.html
关于apache-spark - 为 Jupyter 创建 pyspark 内核,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34998433/