You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ModuleNotFoundError: No module named 'kubernetes.dynamic' #1062
What happened (please include outputs or screenshots):
Cannot execute script from example documentation for list pod.
Traceback (most recent call last):
File "kube.py", line 1, in <module>
from kubernetes import client, config
File "/home/myuga/.local/lib/python3.8/site-packages/kubernetes/__init__.py", line 21, in <module>
import kubernetes.dynamic
ModuleNotFoundError: No module named 'kubernetes.dynamic'
What you expected to happen:
module cannot load properly
How to reproduce it (as minimally and precisely as possible):
Environment:
Kubernetes version (kubectl version): v1.17.0
OS : Manjaro Linux
Python version : 3.8.1
Python client version (pip list | grep kubernetes)
Closing the issue as 11.0.0 has been released. Please reopen if you hit any issue
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Activity
blurLake commentedon Feb 12, 2020
I have the same error here as well.
blurLake commentedon Feb 12, 2020
The error was solved by uninstall kubernetes from pip3 and reinstall using
pip3 install kubernetes. The version I am using is kubernetes 10.0.1.roycaihw commentedon Mar 2, 2020
/assign @micw523
ref #1035
micw523 commentedon Mar 2, 2020
Because this adds a new symbolic link (and we did not support importing from base.dynamic directly), I think reinstalling the package is needed.
roycaihw commentedon Mar 2, 2020
I think it's a bug fix that hasn't been released yet. In 11.0.0b2 we still don't have #1035 included.
On a side note, @micw523 do you know why we didn't add kubernetes.dynamic to setup.py?
python/setup.py
Lines 60 to 63 in 073cf4d
micw523 commentedon Mar 2, 2020
Ah... I think I simply forgot. That might be the reason why.
roycaihw commentedon Mar 9, 2020
The fixes will be included in the upcoming 11.0.0 release #1097
roycaihw commentedon Mar 16, 2020
Closing the issue as 11.0.0 has been released. Please reopen if you hit any issue
/close
k8s-ci-robot commentedon Mar 16, 2020
@roycaihw: Closing this issue.
Details
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.