ImportError: No module named _functools

Tony Lay tonylay at gmail.com
Tue Jul 14 19:59:24 CEST 2009


I'm sooo close to getting this meld program running....had to install
a lot of things in /usr/local to get to pygtk2 functional and I'm
trying to run the meld program and get...

RHEL4 server


Traceback (most recent call last):
  File "/usr/local/bin/meld", line 35, in <module>
    import gettext
  File "/usr/local/lib/python2.6/gettext.py", line 49, in <module>
    import locale, copy, os, re, struct, sys
  File "/usr/local/lib/python2.6/locale.py", line 15, in <module>
    import functools
  File "/usr/local/lib/python2.6/functools.py", line 10, in <module>
    from _functools import partial, reduce
ImportError: No module named _functools

This is with me building all of the dependencies as well as python
with
./configure --prefix=/usr/local --exec-prefix=/usr/local
make distclean
make
make -i install
ldconfig

export PYTHONHOME=/usr/local/lib/python2.6
export PYTHONPATH=/usr/local/lib/python2.6:/usr/local/lib/python2.6/
site-packages

I thought it might have been an err of the application, but I ran
python and received the same error:
[root at orlstscts1 meld-1.0.0]# python
Python 2.6.2 (r262:71600, Jul 14 2009, 11:47:04)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import functools
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/functools.py", line 10, in <module>
    from _functools import partial, reduce
ImportError: No module named _functools

Kind of a python n00b, but the functools.py is there, it's in the
path...everything seems to be lined up right.

Problem is that the server this is on is stable (read older), and I am
to not touch the older software unless it's as a last resort.  For
this reason everything is in /usr/local and built from the ground up.

I'm hoping that there's some silly dependency I'm missing.  I've
installed the following:
atk-1.26.0
pkg-config-0.23
cairo-1.8.8
libglade-2.6.4
pycairo-1.8.6
fontconfig-2.7.0
libpng-1.2.37
pygobject-2.18.0
freetype-2.1.10
libxml2-2.7.3
pygtk-2.15.2
gettext-0.17
meld-1.0.0
pygtk-2.8.6
glade3-3.6.7
meld-1.1.5
Python-2.6.2
glib-2.20.4
glibc-2.9
meld-1.3.0 (no install)
tcl8.5.7
tk8.5.7
gtk+-2.16.4
pango-1.20.5
intltool-0.35.5
pixman-0.15.14

Took me a while to get by fontconfig/freetype junk because (usr/local/
lib/libfontconfig.so: undefined reference to `FT_Select_Size') but
that's a little OT.

If there are any recommendations of what to attack or further
information would help let me know!

Regards,

-Tony



More information about the Python-list mailing list