我在 EMR 上使用 JupyterHub,而 PySpark 或 PySpark3 内核上未安装 Pandas。这些内核也不允许使用!
. 我尝试安装使用
import pip
pip.main(['install','pandas])
但这会引起 ValueError: I/O operation on closed file.
当我打开终端内核时,已经安装了pandas。
请让我知道是否有其他方法可以安装到特定内核。
面临类似的问题,这解决了我的情况
#bootstrap
sudo python3 -m pip install <packages>
# set in $SPARK_HOME/conf/spark-env.sh or use the config.json template for EMR
export PYSPARK_DRIVER_PYTHON=python3
export PYSPARK_PYTHON=python3
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句