Skip to content

Install the kubernetes pcakage successfully but can't use it #1053

Description

@nettyxiong
git clone --recursive https://github.com/kubernetes-client/python.git
cd python
python setup.py install
python
>>> import kubernetes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/kubernetes/__init__.py", line 21, in <module>
    import kubernetes.dynamic
ImportError: No module named dynamic
>>> 

Activity

  1. palnabarun commented on Jan 10, 2020

    @palnabarun
    Member

    Hi @nettyxiong, we are dropping support for Python 2.7 from the client. Can you please try with Python 3 and see if the error still occurs?

  2. palnabarun commented on Jan 10, 2020

    @palnabarun
    Member

    I checked with Python 3.8.0 and the ImportError does not occur.

  3. palnabarun commented on Jan 10, 2020

    @palnabarun
    Member

    Xref: #1054

  4. micw523 commented on Jan 10, 2020

    @micw523
    Contributor

    The dynamic client is enabled in #1035. Looks like there are import issues.
    /assign

  5. palnabarun commented on Jan 10, 2020

    @palnabarun
    Member

    The dynamic client is enabled in #1035. Looks like there are import issues.
    /assign

    I tried it with Python 3.8.0 and the import is working. I couldn't test with Python 2.7 as I couldn't successfully install the client and its dependencies.

  6. micw523 commented on Jan 10, 2020

    @micw523
    Contributor

    I cannot replicate this error with Python 2.7.17 on ubuntu 18.04.
    Command:

    pip install -e git+https://github.com/kubernetes-client/python.git@master#egg=kubernetes
    Python 2.7.17 (default, Nov  7 2019, 10:07:09) 
    [GCC 7.4.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import kubernetes
    >>> from kubernetes import dynamic
    >>> dynamic
    <module 'kubernetes.dynamic' from '/home/micw/py27/src/kubernetes/kubernetes/dynamic/__init__.py'>
    >>> import kubernetes.dynamic
    >>> 
    
  7. micw523 commented on Jan 10, 2020

    @micw523
    Contributor

    /priority awaiting-more-evidence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/documentationCategorizes issue or PR as related to documentation.priority/awaiting-more-evidenceLowest priority. Possibly useful, but not yet enough support to actually get it done.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions