python icon indicating copy to clipboard operation
python copied to clipboard

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

Open tholok97 opened this issue 5 years ago • 9 comments

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

tholok97 avatar Dec 03 '19 14:12 tholok97