[lxc-devel] [PATCH] fix python import error: no module named 'lxc'
Stéphane Graber
stgraber at ubuntu.com
Fri Apr 4 15:09:14 UTC 2014
On Fri, Apr 04, 2014 at 09:52:56PM +0800, Sheng Yong wrote:
> For some distro, the default prefix of lxc is /usr/local, while that of
> python is /usr. If the prefix of module installation is specified, python
> may not find the path of lxc module. So do not set prefix of lxc module
> to use default value.
>
> Signed-off-by: Sheng Yong <shyodx at gmail.com>
While it's true that python may not look in /usr/local, it's no reason
to ignore $prefix either.
You could set PYTHONPATH accordingly and things should then work. I
expect some distros also have /usr/local in their default python path.
Nacked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> src/python-lxc/Makefile.am | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/python-lxc/Makefile.am b/src/python-lxc/Makefile.am
> index b1c10b5..8676823 100644
> --- a/src/python-lxc/Makefile.am
> +++ b/src/python-lxc/Makefile.am
> @@ -11,9 +11,9 @@ all:
>
> install:
> if [ "$(DESTDIR)" = "" ]; then \
> - $(PYTHON) setup.py install --prefix=$(prefix) --no-compile $(DISTSETUPOPTS); \
> + $(PYTHON) setup.py install --no-compile $(DISTSETUPOPTS); \
> else \
> - $(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(prefix) --no-compile $(DISTSETUPOPTS); \
> + $(PYTHON) setup.py install --root=$(DESTDIR) --no-compile $(DISTSETUPOPTS); \
> fi
>
> clean-local:
> --
> 1.9.1
>
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140404/5d25a24d/attachment.pgp>
More information about the lxc-devel
mailing list