I have pulled the latest from xen-unstable on a new machine, I run make world and make install and after rebooting into xen, when i run xm list or anything else i get: # xm list Traceback (most recent call last): File "/usr/sbin/xm", line 5, in <module> from xen.xm import main ImportError: No module named xen.xm I also tried going into the tools dir and make install, because i read that somewhere on google. I don''t get any errors when compiling or installing so I don''t know where to go from here? - chris _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
chris
2011-Jan-19 22:34 UTC
[Xen-users] Re: xen-unstable: ImportError: No module named xen.xm
On Wed, Jan 19, 2011 at 2:29 PM, chris <tknchris@gmail.com> wrote:> I have pulled the latest from xen-unstable on a new machine, I run > make world and make install and after rebooting into xen, when i run > xm list or anything else i get: > > # xm list > Traceback (most recent call last): > File "/usr/sbin/xm", line 5, in <module> > from xen.xm import main > ImportError: No module named xen.xm > > I also tried going into the tools dir and make install, because i read > that somewhere on google. > > I don''t get any errors when compiling or installing so I don''t know > where to go from here? > > - chris >I just tried this again after pulling everything down again and recompiling. Is something broken? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ian Campbell
2011-Jan-20 08:38 UTC
Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
On Wed, 2011-01-19 at 22:34 +0000, chris wrote:> On Wed, Jan 19, 2011 at 2:29 PM, chris <tknchris@gmail.com> wrote: > > I have pulled the latest from xen-unstable on a new machine, I run > > make world and make install and after rebooting into xen, when i run > > xm list or anything else i get: > > > > # xm list > > Traceback (most recent call last): > > File "/usr/sbin/xm", line 5, in <module> > > from xen.xm import main > > ImportError: No module named xen.xm > > > > I also tried going into the tools dir and make install, because i read > > that somewhere on google. > > > > I don''t get any errors when compiling or installing so I don''t know > > where to go from here? > > > > - chris > > > > I just tried this again after pulling everything down again and > recompiling. Is something broken?Nothing currently known. Which host OS are you running? Do: $ python>>> import sys >>> print sys.pathThis should tell you the python path which is where python is looking for stuff. The install process should have dropped xen/xm/main.py somewhere on the system, the build log or "find" should tell you where. Do they correspond? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
chris
2011-Jan-20 16:49 UTC
[Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
On Thu, Jan 20, 2011 at 3:38 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:> On Wed, 2011-01-19 at 22:34 +0000, chris wrote: >> On Wed, Jan 19, 2011 at 2:29 PM, chris <tknchris@gmail.com> wrote: >> > I have pulled the latest from xen-unstable on a new machine, I run >> > make world and make install and after rebooting into xen, when i run >> > xm list or anything else i get: >> > >> > # xm list >> > Traceback (most recent call last): >> > File "/usr/sbin/xm", line 5, in <module> >> > from xen.xm import main >> > ImportError: No module named xen.xm >> > >> > I also tried going into the tools dir and make install, because i read >> > that somewhere on google. >> > >> > I don''t get any errors when compiling or installing so I don''t know >> > where to go from here? >> > >> > - chris >> > >> >> I just tried this again after pulling everything down again and >> recompiling. Is something broken? > > Nothing currently known. > > Which host OS are you running? > > Do: > $ python >>>> import sys >>>> print sys.path > > This should tell you the python path which is where python is looking > for stuff. The install process should have dropped xen/xm/main.py > somewhere on the system, the build log or "find" should tell you where. > Do they correspond? > > Ian. > >This is debian squeeze. I''m guessing something just changed in the python package? # python Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information.>>> import sys >>> print sys.path['''', ''/usr/lib/python2.6'', ''/usr/lib/python2.6/plat-linux2'', ''/usr/lib/python2.6/lib-tk'', ''/usr/lib/python2.6/lib-old'', ''/usr/lib/python2.6/lib-dynload'', ''/usr/local/lib/python2.6/dist-packages'', ''/usr/lib/python2.6/dist-packages'', ''/usr/lib/pymodules/python2.6''] Any idea where to go from here? I don''t know a whole lot about python _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ian Campbell
2011-Jan-20 16:54 UTC
[Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
On Thu, 2011-01-20 at 16:49 +0000, chris wrote:> On Thu, Jan 20, 2011 at 3:38 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote: > > On Wed, 2011-01-19 at 22:34 +0000, chris wrote: > >> On Wed, Jan 19, 2011 at 2:29 PM, chris <tknchris@gmail.com> wrote: > >> > I have pulled the latest from xen-unstable on a new machine, I run > >> > make world and make install and after rebooting into xen, when i run > >> > xm list or anything else i get: > >> > > >> > # xm list > >> > Traceback (most recent call last): > >> > File "/usr/sbin/xm", line 5, in <module> > >> > from xen.xm import main > >> > ImportError: No module named xen.xm > >> > > >> > I also tried going into the tools dir and make install, because i read > >> > that somewhere on google. > >> > > >> > I don''t get any errors when compiling or installing so I don''t know > >> > where to go from here? > >> > > >> > - chris > >> > > >> > >> I just tried this again after pulling everything down again and > >> recompiling. Is something broken? > > > > Nothing currently known. > > > > Which host OS are you running? > > > > Do: > > $ python > >>>> import sys > >>>> print sys.path > > > > This should tell you the python path which is where python is looking > > for stuff. The install process should have dropped xen/xm/main.py > > somewhere on the system, the build log or "find" should tell you where. > > Do they correspond? > > > > Ian. > > > > > > This is debian squeeze. I''m guessing something just changed in the > python package? > > # python > Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> print sys.path > ['''', ''/usr/lib/python2.6'', ''/usr/lib/python2.6/plat-linux2'', > ''/usr/lib/python2.6/lib-tk'', ''/usr/lib/python2.6/lib-old'', > ''/usr/lib/python2.6/lib-dynload'', > ''/usr/local/lib/python2.6/dist-packages'', > ''/usr/lib/python2.6/dist-packages'', ''/usr/lib/pymodules/python2.6''] > > > Any idea where to go from here? I don''t know a whole lot about pythonAs I said before -- use "find" or the build log to figure out where Xen installed itself to, then we can try and figure out where it went wrong. Ian. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
chris
2011-Jan-20 17:23 UTC
[Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
On Thu, Jan 20, 2011 at 11:54 AM, Ian Campbell <Ian.Campbell@eu.citrix.com> wrote:> On Thu, 2011-01-20 at 16:49 +0000, chris wrote: >> On Thu, Jan 20, 2011 at 3:38 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote: >> > On Wed, 2011-01-19 at 22:34 +0000, chris wrote: >> >> On Wed, Jan 19, 2011 at 2:29 PM, chris <tknchris@gmail.com> wrote: >> >> > I have pulled the latest from xen-unstable on a new machine, I run >> >> > make world and make install and after rebooting into xen, when i run >> >> > xm list or anything else i get: >> >> > >> >> > # xm list >> >> > Traceback (most recent call last): >> >> > File "/usr/sbin/xm", line 5, in <module> >> >> > from xen.xm import main >> >> > ImportError: No module named xen.xm >> >> > >> >> > I also tried going into the tools dir and make install, because i read >> >> > that somewhere on google. >> >> > >> >> > I don''t get any errors when compiling or installing so I don''t know >> >> > where to go from here? >> >> > >> >> > - chris >> >> > >> >> >> >> I just tried this again after pulling everything down again and >> >> recompiling. Is something broken? >> > >> > Nothing currently known. >> > >> > Which host OS are you running? >> > >> > Do: >> > $ python >> >>>> import sys >> >>>> print sys.path >> > >> > This should tell you the python path which is where python is looking >> > for stuff. The install process should have dropped xen/xm/main.py >> > somewhere on the system, the build log or "find" should tell you where. >> > Do they correspond? >> > >> > Ian. >> > >> > >> >> This is debian squeeze. I''m guessing something just changed in the >> python package? >> >> # python >> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) >> [GCC 4.4.5] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import sys >> >>> print sys.path >> ['''', ''/usr/lib/python2.6'', ''/usr/lib/python2.6/plat-linux2'', >> ''/usr/lib/python2.6/lib-tk'', ''/usr/lib/python2.6/lib-old'', >> ''/usr/lib/python2.6/lib-dynload'', >> ''/usr/local/lib/python2.6/dist-packages'', >> ''/usr/lib/python2.6/dist-packages'', ''/usr/lib/pymodules/python2.6''] >> >> >> Any idea where to go from here? I don''t know a whole lot about python > > As I said before -- use "find" or the build log to figure out where Xen > installed itself to, then we can try and figure out where it went wrong. > > Ian. > >/usr/lib/python2.6/site-packages/xen/xm/main.py _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ian Campbell
2011-Jan-20 17:38 UTC
[Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
> >> ['''', ''/usr/lib/python2.6'', ''/usr/lib/python2.6/plat-linux2'', > >> ''/usr/lib/python2.6/lib-tk'', ''/usr/lib/python2.6/lib-old'', > >> ''/usr/lib/python2.6/lib-dynload'', > >> ''/usr/local/lib/python2.6/dist-packages'', > >> ''/usr/lib/python2.6/dist-packages'', ''/usr/lib/pymodules/python2.6'']vs.> /usr/lib/python2.6/site-packages/xen/xm/main.pySo the Xen python bits are not installed to a path which the python interpreter is searching. Xen relies on the python distutils library to build and install its python bits and makes no specific reference to site-packages in its makefiles (that I can find). The Debian python policy (http://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html) suggests that this change of location is deliberate from python 2.6 onwards. However /usr/lib/python2.6/distutils/command/install.py still makes reference to site-packages which is no doubt where it is coming from. At this point my Debian python-fu is running low but I think you have found a bug in Debian and should report it to them as such. I also suspect that the fact that distutils is installing non-packaged/locally-built python bits in /usr/lib/python2.6 rather than /usr/local/lib/python2.6 is also a bug in the python system. Ian. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ian Jackson
2011-Jan-20 18:19 UTC
[Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
chris writes ("Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm"):> On Thu, Jan 20, 2011 at 3:38 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote: > This is debian squeeze. I''m guessing something just changed in the > python package?Unfortunately the combination of Python and the Debian Python packaging is a complete disaster. We have had some suggested patches that involve passing a strange option to all instances of setup.py. What I''ll do is prepare a version of that patch which might be suitable for applying to xen-unstable, and post it here. Would you then be able to test it ? Thanks, Ian. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
chris
2011-Jan-20 18:35 UTC
Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
I would be very willing to. Thanks On Jan 20, 2011 1:19 PM, "Ian Jackson" <Ian.Jackson@eu.citrix.com> wrote: chris writes ("Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm"):> On Thu, Jan 20, 2011 at 3:38 AM, Ian Campbell <Ian.Campbell@citrix.com>wrote:> This is debian squeeze. I''m guessing something just changed in the > python package?Unfortunately the combination of Python and the Debian Python packaging is a complete disaster. We have had some suggested patches that involve passing a strange option to all instances of setup.py. What I''ll do is prepare a version of that patch which might be suitable for applying to xen-unstable, and post it here. Would you then be able to test it ? Thanks, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mike Viau
2011-Jan-21 18:20 UTC
RE: [Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
> On Thu, 20 Jan 2011 17:38:23 +0000 <Ian.Campbell@eu.citrix.com> wrote: > > > >> ['''', ''/usr/lib/python2.6'', ''/usr/lib/python2.6/plat-linux2'', > > >> ''/usr/lib/python2.6/lib-tk'', ''/usr/lib/python2.6/lib-old'', > > >> ''/usr/lib/python2.6/lib-dynload'', > > >> ''/usr/local/lib/python2.6/dist-packages'', > > >> ''/usr/lib/python2.6/dist-packages'', ''/usr/lib/pymodules/python2.6''] > > vs. > > > /usr/lib/python2.6/site-packages/xen/xm/main.pyHave you tried modifying the Config.mk is the root directory of your Xen.4.1 sources before compiling? hg diff Config.mk output: --- a/Config.mk Tue Jan 18 17:23:24 2011 +0000 +++ b/Config.mk Fri Jan 21 13:03:32 2011 +0000 @@ -1,7 +1,8 @@ # -*- mode: Makefile; -*- # A debug build of Xen and tools? -debug ?= y +#debug ?= y +debug ?= n XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \ -e s/i86pc/x86_32/ -e s/amd64/x86_64/) @@ -56,7 +57,8 @@ FLEX ?= flex PYTHON ?= python -PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)" +PYTHON_PREFIX_ARG ?= +#PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)" # The above requires that PREFIX contains *no spaces*. This variable is here # to permit the user to set PYTHON_PREFIX_ARG to '''' to workaround this bug: # https://bugs.launchpad.net/ubuntu/+bug/362570 My resulting python path with when changing PYTHON_PREFIX_ARG was apparently /usr/local/lib/python2.6/dist-packages which I noticed was in your python''s interpreter search path(s). ls -l /usr/local/lib/python2.6/dist-packages total 48 -rwxr-xr-x 1 topgun topgun 30693 Jan 18 20:27 fsimage.so drwxr-xr-x 2 topgun topgun 4096 Jan 18 20:57 grub -rw-r--r-- 1 topgun topgun 226 Jan 18 20:31 pygrub-0.3.egg-info drwxr-xr-x 10 topgun topgun 4096 Jan 18 20:57 xen -rw-r--r-- 1 topgun topgun 171 Jan 18 20:31 xen-3.0.egg-info This is only a hack, as I am not sure if I bug has already been reported on the Debian BTS to fix the issue with python 2.6 onwards. /usr/lib/python2.6/distutils/command/install.py still makes reference to site-packages <-- causing the issue (personally unconfirmed, source Xen developer: Ian Campbell who definatly knows more than I do when it comes to Xen or python).> > So the Xen python bits are not installed to a path which the python > interpreter is searching. > > Xen relies on the python distutils library to build and install its > python bits and makes no specific reference to site-packages in its > makefiles (that I can find). > > The Debian python policy > (http://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html) suggests that this change of location is deliberate from python 2.6 onwards. However /usr/lib/python2.6/distutils/command/install.py still makes reference to site-packages which is no doubt where it is coming from. > > At this point my Debian python-fu is running low but I think you have > found a bug in Debian and should report it to them as such. > > I also suspect that the fact that distutils is installing > non-packaged/locally-built python bits in /usr/lib/python2.6 rather > than /usr/local/lib/python2.6 is also a bug in the python system.As pointed out above my /usr/local/lib/python2.6/dist-packages does contain xen realated files, but just incase some locally built python stuff realted to xen did end up /usr/lib/python2.6/ I have attached that larger directory listing as well... a simple search for xen returns nothing. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Jan-21 18:59 UTC
[Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm [and 1 more messages]
chris writes ("Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm"):> I would be very willing to. ThanksHaving looked into this in more detail it would seem likely that you are running into this bug: https://bugs.launchpad.net/ubuntu/+bug/362570 Can you please try running the build again but setting PYTHON_PREFIX_ARG='''' on the make command line or in the environment ? Thanks, Ian. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ian Jackson
2011-Jan-21 19:16 UTC
RE: [Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
Mike Viau writes ("RE: [Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm"):> -PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)" > +PYTHON_PREFIX_ARG ?= > +#PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)" > # The above requires that PREFIX contains *no spaces*. This variable is here > # to permit the user to set PYTHON_PREFIX_ARG to '''' to workaround this bug: > # https://bugs.launchpad.net/ubuntu/+bug/362570...> My resulting python path with when changing PYTHON_PREFIX_ARG was > apparently /usr/local/lib/python2.6/dist-packages which I noticed > was in your python''s interpreter search path(s).Thanks for investigating this.> This is only a hack, as I am not sure if I bug has already been > reported on the Debian BTS to fix the issue with python 2.6 onwards.Launchpad has a facility to refer to Debian bugs, so if anyone has submitted it to Debian they''re probably not a Launchpad user. I had a look in the Debian BTS myself and found no trace of it. We should certainly file a bug there, but this is probably best done when we have figured out whether or not it''s the same as the Ubuntu bug mentioned in Config.mk. Thanks, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Jan-26 14:51 UTC
RE: [Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
Mike Viau writes ("RE: [Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm"):> My resulting python path with when changing PYTHON_PREFIX_ARG was apparently /usr/local/lib/python2.6/dist-packages which I noticed was in your python''s interpreter search path(s).Can you tell me the version of python that you were using when you did this test ? I need the Debian package name and the Debian package version, for the bug report. Thanks, Ian. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mike Viau
2011-Jan-26 17:32 UTC
RE: [Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm
> On Wed, 26 Jan 2011 14:51:19 +0000 <Ian.Jackson@eu.citrix.com> wrote: > > > Mike Viau writes ("RE: [Xen-users] Re: [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm"): > > My resulting python path with when changing PYTHON_PREFIX_ARG was apparently /usr/local/lib/python2.6/dist-packages which I noticed was in your python''s interpreter search path(s). > > Can you tell me the version of python that you were using when you did > this test ? I need the Debian package name and the Debian package > version, for the bug report. >Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) apt-cache policy python python: Installed: 2.6.6-3+squeeze5 Candidate: 2.6.6-3+squeeze5 Version table: *** 2.6.6-3+squeeze5 0 500 http://mirror.csclub.uwaterloo.ca/debian/ squeeze/main amd64 Packages 100 /var/lib/dpkg/status _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Seemingly Similar Threads
- xen-unstable: ImportError: No module named xen.xm
- Trouble installing SWAT on a Samba 4 Alpha 13 build on Ubuntu Server
- Trouble installing SWAT on a Samba 4 Alpha 13 build onUbuntu Server
- Trouble installing SWAT on a Samba 4 Alpha 13 buildonUbuntu Server
- virt-manager 0.8.2 local ISO and PXE boot install option greyed out on 2.6.32.27 pv-ops Dom0 kernel