LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-06-2014, 12:54 AM   #1
Genny
LQ Newbie
 
Registered: Jun 2014
Posts: 2

Rep: Reputation: Disabled
[BLFS] libxcb-1.10: ImportError: No module named _elementtree.


Hi everyone.

I want to install XFCE on my LFS 7.5 system (following the BLFS book's instructions) but there's this error when I'm trying to compile libxcb (which is necessary for XORG):

Quote:
Installation:
Prefix..............: /usr

Making all in src
make[1]: Entering directory '/sources/xc/libxcb-1.10/src'
/usr/bin/python ./c_client.py -p /usr/lib/python2.7/site-packages /usr/share/xcb/xproto.xml
Traceback (most recent call last):
File "./c_client.py", line 2, in <module>
from xml.etree.cElementTree import *
File "/usr/lib/python2.7/xml/etree/cElementTree.py", line 3, in <module>
from _elementtree import *
ImportError: No module named _elementtree
Makefile:1282: recipe for target 'xproto.c' failed
make[1]: *** [xproto.c] Error 1
make[1]: Leaving directory '/sources/xc/libxcb-1.10/src'
Makefile:574: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
It (obviously) seems to be an error with some Python module... And I can't see where the problem is since I've installed Python 2.7.8 (and libxml2-2.9.1, which is recommended by the book) following the BLFS book's instructions to the letter.

Before you ask: yes, I've already tried with Python 3.4.1 (without "--with-system-expat" option during its installation) and It seemed to work... until there's another python-module error installing MesaLib-10.2.2.

So, basically I'm stuck. Hope you can help me this time!

Regards from Venezuela (excuse my bad english).
 
Old 07-06-2014, 04:27 PM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Libxcb requires libXau, xcb-proto, and libXdmcp, not Python packages.

Xcb-proto requires Python 2 or 3, and I'd advise you to use Python 3 and use expat as it's a recommended package. Even though recommended patches aren't required, they are recommended because they resolve a possible needed co-dependency needed by another package.
 
Old 07-22-2014, 11:19 AM   #3
salfter
LQ Newbie
 
Registered: Jul 2014
Posts: 3

Rep: Reputation: Disabled
Question

I'm running into the same problem...tried both Python 2 & 3, and neither work. Python 3 returns a different error:

Code:
/usr/bin/python ./c_client.py -p /usr/lib/python2.7/site-packages /usr/share/xcb/xproto.xml
Traceback (most recent call last):
  File "/usr/lib/python3.4/xml/etree/ElementTree.py", line 1459, in __init__
    from xml.parsers import expat
  File "/usr/lib/python3.4/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named 'pyexpat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/xml/etree/ElementTree.py", line 1462, in __init__
    import pyexpat as expat
ImportError: No module named 'pyexpat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./c_client.py", line 3004, in <module>
    module = Module(args[0], output)
  File "/usr/lib/python2.7/site-packages/xcbgen/state.py", line 64, in __init__
    self.namespace = Namespace(filename)
  File "/usr/lib/python2.7/site-packages/xcbgen/state.py", line 32, in __init__
    self.root = parse(filename).getroot()
  File "/usr/lib/python3.4/xml/etree/ElementTree.py", line 1187, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.4/xml/etree/ElementTree.py", line 592, in parse
    parser = XMLParser()
  File "/usr/lib/python3.4/xml/etree/ElementTree.py", line 1465, in __init__
    "No module named expat; use SimpleXMLTreeBuilder instead"
ImportError: No module named expat; use SimpleXMLTreeBuilder instead
Makefile:1282: recipe for target 'xproto.c' failed
make[1]: *** [xproto.c] Error 1
make[1]: Leaving directory '/home/salfter/xc/libxcb-1.10/src'
Makefile:574: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
I built it according to the directions here, and changed the /usr/bin/python symlink to use it.
 
Old 07-22-2014, 02:42 PM   #4
salfter
LQ Newbie
 
Registered: Jul 2014
Posts: 3

Rep: Reputation: Disabled
Lightbulb

Quote:
Originally Posted by salfter View Post
I'm running into the same problem...tried both Python 2 & 3, and neither work.
Trying again after rebuilding expat & python3...so far, so good.

Update: Build succeeded.

Last edited by salfter; 07-22-2014 at 02:53 PM. Reason: update
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ImportError: No module named pygtk orbit Slackware 11 06-25-2013 06:50 AM
ImportError: No module named cairo mattjohnstone22 Linux - Software 1 11-14-2007 05:12 AM
ImportError: No module named gtk peterkarlos Mandriva 3 02-14-2007 08:27 AM
ImportError: No module named libglade Kanaflloric Programming 0 08-16-2004 09:58 PM
ImportError: No module named gconf linorg Linux - Software 8 02-02-2004 04:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration