Unable to install the python client
See original GitHub issueWhat happened (please include outputs or screenshots): Tried to install the python client: Error 1: When trying to install through - python setup.py install
Switched to a new branch 'release-11.0'
M kubernetes/base
Branch 'release-11.0' set up to track remote branch 'release-11.0' from 'origin'.
PS D:\python> python setup.py install
running install
running bdist_egg
running egg_info
writing kubernetes.egg-info\PKG-INFO
writing dependency_links to kubernetes.egg-info\dependency_links.txt
writing requirements to kubernetes.egg-info\requires.txt
writing top-level names to kubernetes.egg-info\top_level.txt
error: supposed package directory 'kubernetes\config' exists, but is not a directory
Error 2: While installing from pip
PS D:\python> python -m examples.api_discovery.py
Traceback (most recent call last):
File "D:\Softwares\Anaconda3\lib\runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "D:\Softwares\Anaconda3\lib\runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "D:\Kubernetes open source - Python client\Python\python\examples\api_discovery.py", line 20, in <module>
from kubernetes import client, config
File "D:\Kubernetes open source - Python client\Python\python\kubernetes\__init__.py", line 20, in <module>
import kubernetes.config
ModuleNotFoundError: No module named 'kubernetes.config'
What you expected to happen: Run the examples given for the python client
How to reproduce it (as minimally and precisely as possible):
-
For error 1: git clone --recursive https://github.com/kubernetes-client/python.git cd python python setup.py install
-
For error 2: pip install kubernetes python -m examples.api_discovery
Anything else we need to know?: The path : python/kubernetes/config is a file instead of a directory as the Error 1 snippet suggests https://github.com/kubernetes-client/python/blob/master/kubernetes/config
Environment:
- Kubernetes version (
kubectl version
):
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"9e991415386e4cf155a24b1da15becaa390438d8", GitTreeState:"clean", BuildDate:"2020-03-25T14:58:59Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:43:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
- OS (e.g., MacOS 10.13.6): Windows 10
- Python version (
python --version
): Python 3.7.3 - Python client version (
pip list | grep kubernetes
): 11.0.0b2
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
[Fixed] ModuleNotFoundError: No module named 'google'
Solution Idea 1: Install Library google-api-python-client ... The most likely reason is that Python doesn't provide google-api-python-client in its standard ...
Read more >Cannot install googleapiclient on PyCharm - Stack Overflow
I think you're just using the wrong name. Try pip install google-api-python-client as specified here.
Read more >Can't install the python client - Bitcraze Forums
Hi, Try installing without dev (pip install -e.[qt5]), if the problem only comes from cx_freeze it will work. Cx_freeze is only needed if...
Read more >Installing Python Modules (Legacy version) — Python 3.11.1 ...
Note. This guide only covers the basic tools for building and distributing extensions that are provided as part of this version of Python....
Read more >Python Installation - Earth Engine - Google Developers
Python Package Installer: pip install earthengine-api --upgrade. Here is a short script that tests if you have working installation: import ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @micw523 before doing that I just removed the library using pip and then did pip install Kubernetes. This time it worked and I was able to install the python client successfully. Closing this issue.
Hi, please check this document for additional installation instructions if you’re installing from the source on Windows.
Since you might have had an incomplete installation of the Python client, I’d suggest trying to use pip to remove it first, clean out the corresponding folder in the Python library, and perform an reinstall.