[英]How to import from another ipynb file in EMR jupyter notebook which runs a PySpark kernel?
I'm using jupyter notebook on AWS EMR to run PySpark, and is having trouble importing modules from another file.我在 AWS EMR 上使用 jupyter notebook 运行 PySpark,但在从另一个文件导入模块时遇到问题。 I tried a couple methods that I searched on stackoverflow, none worked.我尝试了在 stackoverflow 上搜索的几种方法,但都没有奏效。 More specifically, I tried the following (here I have a notebook named "include.ipynb" in the same directory as the notebook that runs the import statements):更具体地说,我尝试了以下操作(这里我有一个名为“include.ipynb”的笔记本,与运行导入语句的笔记本位于同一目录中):
Both of these methods worked in jupyter notebook on my local computer.这两种方法都适用于我本地计算机上的 jupyter notebook。 Why aren't they working on AWS?他们为什么不在 AWS 上工作?
You have to install these packages in your EMR explicitly using Pip or conda.您必须使用 Pip 或 conda 在 EMR 中明确安装这些软件包。 Your local has those packages installed already.您的本地已经安装了这些软件包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.