我正在尝试将GraphFrame导入我的Databricks笔记本中。
from graphframes import *
但是出现了以下错误信息:
导入错误:找不到名为“graphframes”的模块
我该如何将其添加/导入到Databricks笔记本中?感谢任何帮助。
from graphframes import *
但是出现了以下错误信息:
导入错误:找不到名为“graphframes”的模块
我该如何将其添加/导入到Databricks笔记本中?感谢任何帮助。
%sh
/databricks/python3/bin/pip install graphframes
方法2:使用Databricks 库实用程序
语法:dbutils.library.installPyPI("pypipackage", version="version", repo="repo", extras="extras")
dbutils.library.restartPython() # Removes Python state, but some libraries might not work without calling this function
dbutils.library.installPyPI("graphframes")
尝试了本文中提供的示例GraphFrames文档。
笔记本输出:
希望这有所帮助。graphframes
不是 Python 的默认依赖项。您应该安装此依赖项。
您需要安装graphframes模块,打开终端并输入 pip install graphframes