我有一个python wheel上传到安装在databricks服务中的azure存储帐户中。我正在尝试使用databricks文档中所述的群集初始化脚本安装车轮。
我的存储肯定已安装,并且文件路径对我而言似乎正确。display(dbutils.fs.ls("/mnt/package-source"))
在笔记本中运行命令会产生以下结果:
path: dbfs:/mnt/package-source/parser-3.0-py3-none-any.whl
name: parser-3.0-py3-none-any.whl
我尝试使用以下命令从群集初始化文件安装滚轮:
/databricks/python/bin/pip install "dbfs:/mnt/package-source/parser-3.0-py3-none-any.whl"
但是群集无法启动。它的日志给我一个错误,提示它找不到文件:
WARNING: Requirement 'dbfs:/mnt/package-source/parser-3.0-py3-none-any.whl' looks like a filename, but the file does not exist
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/dbfs:/mnt/package-source/parser-3.0-py3-none-any.whl'
我也这样尝试过:
/databricks/python/bin/pip install /mnt/package-source/parser-3.0-py3-none-any.whl
但我收到类似的错误:
WARNING: Requirement '/mnt/package-source/parser-3.0-py3-none-any.whl' looks like a filename, but the file does not exist
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/mnt/package-source/parser-3.0-py3-none-any.whl'
我什至尝试使用相对路径,例如../../mnt/package-source/...
但无济于事。谁能告诉我我做错了吗?
我使用相对路径来工作。事实证明../../mnt/
这不是正确的路径。它使用../../../dbfs/mnt/
。使用bashls
命令探索文件系统只是花了一点时间。
对于遇到相同问题的其他人,我建议从笔记本中开始以下内容:
%%sh
ls ../../../
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句