KFP SDK v2 ERROR: Could not find a version that satisfies the requirement kfp==2.2.0

`Trying to create a pipeline using KFP v2.2.0 SDK by upgrading from KFP v1.8.22. The pipeline component fails to run with the below error.

Error:

time="2024-05-09T01:09:26.010Z" level=info msg="capturing logs" argo=true
time="2024-05-09T01:09:26.070Z" level=info msg="capturing logs" argo=true
I0509 01:09:26.114461      42 launcher_v2.go:90] input ComponentSpec:{
"inputDefinitions": {
"parameters": {
"num1": {
"parameterType": "NUMBER_INTEGER"
},
"num2": {
"parameterType": "NUMBER_INTEGER"
}
}
},
"outputDefinitions": {
"parameters": {
"Output": {
"parameterType": "NUMBER_INTEGER"
}
}
},
"executorLabel": "exec-addition-component"
}
I0509 01:09:26.116617      42 cache.go:139] Cannot detect ml-pipeline in the same namespace, default to ml-pipeline.kubeflow:8887 as KFP endpoint.
I0509 01:09:26.116655      42 cache.go:116] Connecting to cache endpoint ml-pipeline.kubeflow:8887
I0509 01:09:26.358737      42 object_store.go:306] Cannot detect minio-service in the same namespace, default to minio-service.kubeflow:9000 as MinIO endpoint.
WARNING: The repository located at pypi.org is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.org'.
ERROR: Could not find a version that satisfies the requirement kfp==2.2.0 (from versions: none)
ERROR: No matching distribution found for kfp==2.2.0
I0509 01:09:28.199823      42 launcher_v2.go:151] publish success.
F0509 01:09:28.199935      42 main.go:49] failed to execute component: exit status 1
time="2024-05-09T01:09:29.074Z" level=info msg="sub-process exited" argo=true error="<nil>"
Error: exit status 1
time="2024-05-09T01:09:30.017Z" level=info msg="sub-process exited" argo=true error="<nil>"
Error: exit status 1

Code:

import kfp
from kfp import compiler
from kfp import dsl

@dsl.component(base_image='silverlogic/python3.8:latest', install_kfp_package=False, packages_to_install=['kfp==2.2.0'], pip_index_urls=['http://pypi.org/simple'])
def addition_component(num1: int, num2: int) -> int:
return num1 + num2

@dsl.pipeline(name='addition-pipeline')
def my_pipeline(a: int=1, b: int=2, c: int = 10):
add_task_1 = addition_component(num1=a, num2=b)
add_task_2 = addition_component(num1=add_task_1.output, num2=c)

cmplr = compiler.Compiler()
cmplr.compile(my_pipeline, package_path='my_pipeline.yaml')

HOST = "<host-name>"
USERNAME = "<user-name>"
PASSWORD = "<password>"
NAMESPACE = "kubeflow-user-example-com"
import requests
session = requests.Session()
response = session.get(HOST)

headers = {
"Content-Type": "application/x-www-form-urlencoded",
}

data = {"login": USERNAME, "password": PASSWORD}
session.post(response.url, headers=headers, data=data)
print (session.cookies.get_dict())
session_cookie = session.cookies.get_dict()["authservice_session"]

client=kfp.Client(host=f"{HOST}/pipeline",
cookies=f"authservice_session={session_cookie}",
namespace=NAMESPACE,)

client.create_run_from_pipeline_package('my_pipeline.yaml',arguments={"a":1,"b":2})

Environment

Using KFP as part of full Kubeflow Installation for on-prem RHEL server.
Python Version
Python 3.8.10

Kubeflow Version:
Kubeflow 1.8

KFP SDK Version Installed:
kfp 2.2.0
kfp-pipeline-spec 0.2.2
kfp-server-api 2.0.5

Expected Result

The pipeline component should run successfully.`

New contributor

Shaktee Biswal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật