3

在 PyCharm IDE 中使用 Windows 10 和 Python 3.9

我正在尝试使用以下代码列出管道:

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 管道。

我通过在 Pycharm 终端中执行以下命令安装了 Kubeflow Pipeline SDK:

  • conda create --name mlpipeline python=3.7
  • conda 激活 mlpipeline
  • pip3 安装 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

我努力了

  • 安装 Google Cloud SDK 并初始化 gcloud(虽然当我运行命令时显示“找不到 Python”
  • 使用 gcloud 命令安装 kubectl 和 gsutil
4

2 回答 2

0

我过渡到 Ubuntu 并从那里解决了问题。

我做了什么:

  • 安装 Google Cloud SDK 并进行配置:https ://cloud.google.com/sdk/docs/quickstart

    gcloud components install component_id还使用命令安装 gsutil 和 kubectl

  • 安装 KFP SDK: 在终端中运行以下命令:

     apt-get update; 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 python=3.7   
     conda activate mlpipeline
    
     pip3 install kfp --upgrade
    
于 2020-12-06T10:34:54.043 回答
0

我遇到了完全相同的问题。我通过使用 Ubuntu 操作系统而不是 Windows 操作系统来修复它。使用虚拟机并在虚拟机中运行 Ubuntu。Ubuntu 环境更易于设置和管理。

于 2021-01-12T10:05:57.260 回答