[lxc-users] pylxd falling at the first hurdle

Matt Green mephi at mephi.co.uk
Fri Oct 7 21:14:43 UTC 2016


Apologies for replying to my own message, but I've figured it out. If
anyone else is wondering I ended up with:

from pylxd import client
lxdClient = client.Client()

Matt


On 7 October 2016 at 22:03, Matt Green <mephi at mephi.co.uk> wrote:

> Hi,
>
> I'm trying to play around with pylxd but not getting very far. The
> documentation states you can start with:
>
> >>> from pylxd import Client>>> client = Client()
>
>
> When I try it, I get:
> >>> from pylxd import Client
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: cannot import name Client
>
> I've found that I can do:
> >>> from pylxd import client
>
> But I can't assign that to anything:
> >>> lxdClient = client()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: 'module' object is not callable
>
>
> I've got what I think is a pretty standard Ubuntu server 16.04 install, I
> apt-get installed LXD originally and when I started this I've apt-get
> installed python-pylxd (although I've also tried a pip install and that
> didn't change anything).
>
> Any ideas what's wrong?
>
> Cheers,
>
> Matt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20161007/b4af805e/attachment.html>


More information about the lxc-users mailing list