Python 2.7 installation problem

Ronald Guida oddron at
Sun Sep 26 08:19:59 CEST 2010


I am trying to perform a user-install of python 2.7 on Ubuntu 10.04, and my
installation is failing.

This sequence of commands reproduces the failure on my system:

$ tar -zxvf Python-2.7.tgz
$ cd Python-2.7/
$ ./configure --prefix=$HOME
$ make
$ ./python Lib/test/
doctest (collections) ... 54 tests with zero failures
$ make altinstall
$ cd
$ which python2.7
$ python2.7
Python 2.7 (r27:82500, Sep 26 2010, 01:49:59)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import collections
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/oddron/lib/python2.7/", line 8, in <module>
    from _collections import deque, defaultdict
ImportError: No module named _collections
>>> import sys
>>> sys.path
['', '/home/oddron/lib/', '/home/oddron/lib/python2.7',
'/home/oddron/lib/python2.7/lib-tk', '/home/oddron/lib/python2.7/lib-old',

Things I have already checked:
* My path includes ~/bin
* None of PYTHONHOME and friends are set.
* I have also tried "make install" instead of "make altinstall", and I get
the same failure.

Can anyone give me a hint regarding what has gone wrong?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list