Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nettyxiong opened this issue Jan 10, 2020 · 7 comments
Closed

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

nettyxiong opened this issue Jan 10, 2020 · 7 comments
Assignees
Labels
kind/documentation Categorizes issue or PR as related to documentation. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@nettyxiong
Copy link

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
>>> 
@nettyxiong nettyxiong added the kind/documentation Categorizes issue or PR as related to documentation. label Jan 10, 2020
@palnabarun
Copy link
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?

@palnabarun
Copy link
Member

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

@palnabarun
Copy link
Member

Xref: #1054

@micw523
Copy link
Contributor

micw523 commented Jan 10, 2020

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

@palnabarun
Copy link
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.

@micw523
Copy link
Contributor

micw523 commented Jan 10, 2020

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
>>> 

@micw523
Copy link
Contributor

micw523 commented Jan 10, 2020

/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

4 participants