Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ImportError: No module named _functools

120 views
Skip to first unread message

Tony Lay

unread,
Jul 14, 2009, 1:59:24 PM7/14/09
to
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@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

Aahz

unread,
Jul 16, 2009, 10:14:40 AM7/16/09
to
In article <45228cf4-0b37-4c52...@l32g2000vbp.googlegroups.com>,

Tony Lay <ton...@gmail.com> wrote:
>
>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

Where is _functools.so?
--
Aahz (aa...@pythoncraft.com) <*> http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur." --Red Adair

Tony Lay

unread,
Jul 16, 2009, 3:45:27 PM7/16/09
to
On Jul 16, 10:14 am, a...@pythoncraft.com (Aahz) wrote:
> In article <45228cf4-0b37-4c52-bf6f-d7bd124b0...@l32g2000vbp.googlegroups.com>,

> Tony  Lay  <tony...@gmail.com> wrote:
>
>
>
> >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
>
> Where is _functools.so?
> --
> Aahz (a...@pythoncraft.com)           <*>        http://www.pythoncraft.com/

>
> "If you think it's expensive to hire a professional to do the job, wait
> until you hire an amateur."  --Red Adair

/usr/local/lib/python2.6/lib-dynload/

It's in the path...


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

site-packages:/usr/local/lib/python2.6/lib-dynload:/usr/local/etc/
pango

Tony Lay

unread,
Jul 16, 2009, 3:56:31 PM7/16/09
to
> Tony  Lay  <tony...@gmail.com> wrote:
>
>
>
> >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
>
> Where is _functools.so?
> --
> Aahz (a...@pythoncraft.com)           <*>        http://www.pythoncraft.com/

>
> "If you think it's expensive to hire a professional to do the job, wait
> until you hire an amateur."  --Red Adair

/usr/local/lib/python2.6/lib-dynload/

It's in the path...

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

site-packages:/usr/local/lib/python2.6/lib-dynload:/usr/local/etc/
pango

Aahz

unread,
Jul 16, 2009, 11:39:39 PM7/16/09
to
In article <bfd28485-adaf-43ca...@l2g2000vba.googlegroups.com>,
Tony Lay <ton...@gmail.com> wrote:
>On Jul 16, 10:14=A0am, a...@pythoncraft.com (Aahz) wrote:
>> In article <45228cf4-0b37-4c52-bf6f-d7bd124b0...@l32g2000vbp.googlegroups=
>.com>,

>> Tony =A0Lay =A0<tony...@gmail.com> wrote:
>>>
>>>Traceback (most recent call last):
>>> =A0File "/usr/local/bin/meld", line 35, in <module>
>>> =A0 =A0import gettext
>>> =A0File "/usr/local/lib/python2.6/gettext.py", line 49, in <module>
>>> =A0 =A0import locale, copy, os, re, struct, sys
>>> =A0File "/usr/local/lib/python2.6/locale.py", line 15, in <module>
>>> =A0 =A0import functools
>>> =A0File "/usr/local/lib/python2.6/functools.py", line 10, in <module>
>>> =A0 =A0from _functools import partial, reduce

>>>ImportError: No module named _functools
>>
>> Where is _functools.so?
>
>/usr/local/lib/python2.6/lib-dynload/
>
>It's in the path...
>export PYTHONHOME=3D/usr/local/lib/python2.6
>export PYTHONPATH=3D/usr/local/lib/python2.6:/usr/local/lib/python2.6/
>site-packages:/usr/local/lib/python2.6/lib-dynload:/usr/local/etc/

What's in sys.path? You might also get somewhere with "python -vv".
--
Aahz (aa...@pythoncraft.com) <*> http://www.pythoncraft.com/

0 new messages