I have a Python package saved in CodeCommit and I need it to run in the notebook linked to an EMR cluster.

0

I have a Python package saved in CodeCommit and need to use it in the notebook attached to my EMR cluster workspace. The package is already successfully installed via bootstrap. To do this, in my .sh file, I need to configure git to access CodeCommit and then use pip install git+https://my_package.foo. This part works fine.

However, in the PySpark notebook already attached to the cluster, if I try to install using sc.install_pypi_package("my_package"), it recognizes the package and proceeds with the installation. It even appears in the sc.list_packages() listing. But when I try to import it, I receive the error:

An error was encountered:
No module named 'notebook.notebookapp'
Traceback (most recent call last):
File "/mnt2/yarn/usercache/livy/appcache/application_1710938070423_0006/container_1710938070423_0006_01_000001/tmp/spark-436a127f-1c84-491c-ad55-d60e244939d5/lib/python3.9/site-packages/my_package/init.py", line 31, in <module>
from notebook.notebookapp import NotebookApp
ModuleNotFoundError: No module named 'notebook.notebookapp'

Any help is welcome. Including other installation methods.

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠