https://pulumi.com logo
#python
Title
# python
b

brief-school-94535

03/22/2019, 4:36 PM
Getting this error from python
pulumi_kubernetes
module seems like it’s not seeing the core module. Pylint isn’t balking at it so not sure what’s going on. Any ideas?
Here is some more details on the
pulumi-kubernetes
module Name: pulumi-kubernetes Version: 0.21.1 Summary: A Pulumi package for creating and managing Kubernetes resources. Home-page: https://pulumi.io Author: UNKNOWN Author-email: UNKNOWN License: Apache-2.0 Location: /Users/angel/.pyenv/versions/3.7.2/lib/python3.7/site-packages Requires: pulumi Required-by:
g

gorgeous-egg-16927

03/22/2019, 5:01 PM
I don’t see anything obvious from the info you posted. This just worked for me:
Copy code
import pulumi_kubernetes
namespace = pulumi_kubernetes.core.v1.Namespace("foo")
b

brief-school-94535

03/22/2019, 5:07 PM
@gorgeous-egg-16927 thx for the response
@gorgeous-egg-16927 what version of pulumi_kubernetes are you using? Could it be a version incompatibility?
g

gorgeous-egg-16927

03/22/2019, 5:11 PM
That was also on 0.21.1.
b

brief-school-94535

03/22/2019, 5:11 PM
hmmm not sure what’s going on here then
g

gorgeous-egg-16927

03/22/2019, 5:16 PM
I’d guess something to do with your python env, but i’m much less familiar with the python sdk. @incalculable-sundown-82514 might be able to help troubleshoot
i

incalculable-sundown-82514

03/22/2019, 5:24 PM
I actually think that this is a Python thing. Here’s a write-up I made about this particular issue: https://github.com/pulumi/pulumi-terraform/pull/356
The upshot for your code is that you can do
from pulumi_kubernetes.core.v1 import Namespace
to import specific classes.
However I do think that it would be useful to make the syntax that you did work - I’m working on that.
b

brief-school-94535

03/22/2019, 5:24 PM
great
I’ll try your work around
int he meantime
i

incalculable-sundown-82514

03/22/2019, 5:25 PM
great!
b

brief-school-94535

03/22/2019, 5:50 PM
I used your work around & it got me past the
core
module not found issue but now I’m experiencing a new issue
I’ll post out of thread
thx