如何将boto3安装到EMR群集上以与Jupyter Notebook一起使用

问题描述 投票:0回答:1

我在EMR上安装boto3时遇到问题。这是我当前正在使用的引导脚本:

#!/bin/bash
# Install Python 3 kernel
sudo yum install python3
sudo yum install python3-pip
sudo pip3 install -U boto3

我检查了日志,并说boto3已成功安装,但是当我尝试将其导入Jupyter笔记本时,我得到ModuleNotFoundError:没有名为'boto3'的模块

amazon-web-services jupyter-notebook amazon-emr
1个回答
0
投票

想通了。使用pyspark内核启动笔记本,然后运行以下命令:

sc.install_pypi_package(“boto3”)
© www.soinside.com 2019 - 2024. All rights reserved.