[lxc-users] lxc-ls question

Tamas Papp tompos at martos.bme.hu
Sun Feb 23 20:06:07 UTC 2014


On 02/23/2014 08:59 PM, Kevin Wilson wrote:
> Hello,
> My question is about lxc.1.0:
>
> I want first to verify that my understanding is correct:
> lxc-ls, which is a python script, is created both when using
> --enable-python and when not using --enable-python in ./configure.
> And in fact, --enable-python is not needed so that it will work.

Probably yes, --enable-python should be default, though personally I've
never tried it.

> Please let me know if I am correct in this (and I would appreciate if
> somebody will elaborate about what is --enable-python for).

lxc-ls uses via python api.

> Second, I have a Fedora 20 x86_64 machine on which docker is
> installed; as part of
> docker rpm installation, it installs lxc 0.9.
>
> I want to do tests with lxc-1.0 on this machine without
> removing docker, so I had installed lxc-1.0 from the tar file
> from http://linuxcontainers.org/downloads/
>
> I had run this:
> ./configure --enable-python  --prefix=/test
> make && make install
> export PATH=/test/bin:$PATH
> export LD_LIBRARY_PATH=/test/lib
>
> lxc-ls
> Traceback (most recent call last):
>   File "/test/bin/lxc-ls", line 31, in <module>
>     import lxc
> ImportError: No module named 'lxc'
> I also tried without --enable-python (though it seems to me not needed at all):
>
> ./configure   --prefix=/test
> make && make install
> export PATH=/test/bin:$PATH
> export LD_LIBRARY_PATH=/test/lib
>
>
> lxc-ls
> Traceback (most recent call last):
>   File "/test/bin/lxc-ls", line 31, in <module>
>     import lxc
> ImportError: No module named 'lxc'
>
> Any ideas ?

You need to install python module to its appropriate place (or set it up
properly).

> I would appreciate if somebody will test it on his machine (Ubunut/other) and
> tell me it does work (and on which distro and the distro version)

On ubuntu it looks like this:

/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/python3-lxc
/usr/share/doc/python3-lxc/copyright
/usr/share/doc/python3-lxc/examples
/usr/share/doc/python3-lxc/examples/pyconsole.py
/usr/share/doc/python3-lxc/examples/pyconsole-vte.py
/usr/share/doc/python3-lxc/examples/api_test.py.gz
/usr/lib
/usr/lib/python3
/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages/lxc
/usr/lib/python3/dist-packages/lxc/__init__.py
/usr/lib/python3/dist-packages/_lxc.cpython-34m-x86_64-linux-gnu.so
/usr/lib/python3/dist-packages/_lxc-0.1.egg-info
/usr/lib/python3/dist-packages/_lxc.cpython-33m-x86_64-linux-gnu.so
/usr/share/doc/python3-lxc/changelog.Debian.gz


tamas



More information about the lxc-users mailing list