Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

When installing from release zip: "error: package directory 'kubernetes/config' does not exist"

未關閉
#1,026 9 則留言 2 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

@micw523 已經在處理了。

開始於 2019年12月3日。

  • #1031 來自 @micw523 —— 已合併

評估

這個 Issue 還沒有評估資料。

描述

kind/bug lifecycle/frozen

What happened (please include outputs or screenshots):

Install from release zip fails with message "error: package directory 'kubernetes/config' does not exist". Looking at the exploded zip the kubernetes/config link is broken, and the kubernetes/base directory is empty.

Our issue looks like this one https://github.com/kubernetes-client/python/issues/532, and the solution there was to properly install submodules. Is it possible that the release zip is missing submodules?

What you expected to happen:

I expect installation following the instructions provided for the release to work.

How to reproduce it (as minimally and precisely as possible):

This Dockerfile shows my issue:

FROM ubuntu:16.04

RUN apt-get update && apt-get install -y \
    unzip \
    curl \
    python \
    python-pip \
    && rm -rf /var/lib/apt/lists/*

RUN pip install 'setuptools>=21.0.0' requests

# Installing from zip based on https://github.com/kubernetes-client/python/releases/tag/v11.0.0b2

RUN curl -LO https://github.com/kubernetes-client/python/archive/v11.0.0b2.zip \
    && unzip v11.0.0b2.zip \
    && cd python-11.0.0b2 \
    && python setup.py install

docker build . on this will give the error "error: package directory 'kubernetes/config' does not exist".

The steps above the actual installation in the Dockerfile are just to mimmick our environment.

Anything else we need to know?:

Before we were installing by git clone --recurse-submodules. We want to move away from this and use the zip you provide directly instead, to remove the usage of git.

Note that we are not using pip, this is why we'd like to use the python setup.py install method. The usage of pip in the above Dockerfile is just to quicly mimmick our setup for this issue.

Environment:

  • Kubernetes version (kubectl version): N/A
  • OS (e.g., MacOS 10.13.6): Ubuntu 16.04 (Demo Dockerfile), Centos 7
  • Python version (python --version): Python 2.7.12
  • Python client version (pip list | grep kubernetes): N/A
主要語言
Python
星號
7.7k
分支
3.5k
平均合併
1 天 8 小時
30 天內合併 PR
21

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

kubernetes-client/python 的其他 Issue

查看 kubernetes-client/python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。