使用带有 Python 和 PyCharm 的 Kubeflow Pipelines SDK 连接到 AI Platform Pipelines
·
回答问题
将 Windows 10 和 Python 3.9 与 PyCharm IDE 一起使用
我正在尝试使用以下代码列出管道:
import kfp
client = kfp.Client(host='.......bb92ea05-dot-us-central2.pipelines.googleusercontent.com')
client.list_pipelines()
我知道主机变量是正确的,因为我是从 AI 平台管道复制的。我遇到以下问题:
FileNotFoundError: [WinError 2] The system cannot find the file specified
我认为无法找到该文件,因为程序无法连接到 GCP 的 AI PLatform Pipeline。
我通过在 Pycharm 终端中执行以下命令安装了 Kubeflow Pipeline SDK:
-
conda create --name mlpipeline pythonu003d3.7
-
conda 激活 mlpipeline
-
pip3 install kfp --upgrade --user
当我跑步时:
kfp diagnose_me
我收到以下命令错误:
Google Cloud SDK is not installed, gcloud, gsutil and kubectl are required for this app to run. Please follow instructions at https://cloud.google.com/sdk/install to install the SDK
我努力了
-
安装谷歌云 SDK 并初始化 gcloud(虽然当我运行一个命令时它说 'Python not found')
-
使用 gcloud 命令安装 kubectl 和 gsutil
Answers
我过渡到 Ubuntu 并从那里解决了问题。
我做了什么:
- 安装谷歌云SDK并配置:https://cloud.google.com/sdk/docs/quickstart
同时使用gcloud components install component_id命令安装 gsutil 和 kubectl
- 安装KFP SDK:在终端运行以下命令:
易于获取更新; apt-get install -y wget bzip2
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
conda create --name mlpipeline pythonu003d3.7
conda 激活 mlpipeline
pip3 安装 kfp --upgrade
更多推荐
所有评论(0)