Install trouble of distribute on a fresh ubuntu karmic with setuptools added

Issue #90 resolved
manatlan
created an issue

python2.6.4 under a fresh install of "ubuntu karmic 9.10"

{{{

!python

manatlan@manatlan-desktop:~/Documents$ wget http://python-distribute.org/distribute_setup.py
--2009-11-10 22:46:49-- http://python-distribute.org/distribute_setup.py
Résolution de python-distribute.org... 88.191.12.35
Connexion vers python-distribute.org|88.191.12.35|:80... connecté.
requête HTTP transmise, en attente de la réponse... 200 OK
Longueur: 14614 (14K) [text/x-python]
Saving to: `distribute_setup.py'

100%[======================================>] 14 614 --.-K/s in 0,06s

2009-11-10 22:46:49 (233 KB/s) - « distribute_setup.py » sauvegardé [14614/14614]

manatlan@manatlan-desktop:~/Documents$ sudo python distribute_setup.py
[sudo] password for manatlan:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.8.tar.gz
Extracting in /tmp/tmpHGiJk0
Now working in /tmp/tmpHGiJk0/distribute-0.6.8
Installing Distribute
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /usr/lib/python2.6/dist-packages
Non-egg installation
Removing elements out of the way...
Renaming /usr/lib/python2.6/dist-packages/setuptools.egg-info into /usr/lib/python2.6/dist-packages/setuptools.egg-info.OLD.1257889623.95
Renaming /usr/lib/python2.6/dist-packages/setuptools into /usr/lib/python2.6/dist-packages/setuptools.OLD.1257889623.97
Renaming /usr/lib/python2.6/dist-packages/pkg_resources.py into /usr/lib/python2.6/dist-packages/pkg_resources.py.OLD.1257889623.97
Renaming /usr/lib/python2.6/dist-packages/site.py into /usr/lib/python2.6/dist-packages/site.py.OLD.1257889623.97
Patched done.
Relaunching...
Traceback (most recent call last):
File "setup.py", line 41, in <module>
from setuptools import setup, find_packages
File "/tmp/tmpHGiJk0/distribute-0.6.8/setuptools/init.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/tmp/tmpHGiJk0/distribute-0.6.8/setuptools/extension.py", line 2, in <module>
from setuptools.dist import _get_unpatched
File "/tmp/tmpHGiJk0/distribute-0.6.8/setuptools/dist.py", line 7, in <module>
from setuptools.command.sdist import sdist
File "/tmp/tmpHGiJk0/distribute-0.6.8/setuptools/command/sdist.py", line 4, in <module>
import os, re, sys, pkg_resources
File "/tmp/tmpHGiJk0/distribute-0.6.8/pkg_resources.py", line 2656, in <module>
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpHGiJk0/distribute-0.6.8/pkg_resources.py", line 647, in subscribe
callback(dist)
File "/tmp/tmpHGiJk0/distribute-0.6.8/pkg_resources.py", line 2656, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpHGiJk0/distribute-0.6.8/pkg_resources.py", line 2162, in activate
self.insert_on(path)
File "/tmp/tmpHGiJk0/distribute-0.6.8/pkg_resources.py", line 2256, in insert_on
if '0.7' in self.version:
File "/tmp/tmpHGiJk0/distribute-0.6.8/pkg_resources.py", line 2120, in version
"Missing 'Version:' header and/or PKG-INFO file", self
ValueError: ("Missing 'Version:' header and/or PKG-INFO file", setuptools [unknown version] (/usr/lib/python2.6/dist-packages))
Traceback (most recent call last):
File "distribute_setup.py", line 458, in <module>
main(sys.argv[1:])
File "distribute_setup.py", line 454, in main
_install(tarball)
File "distribute_setup.py", line 82, in _install
assert _python_cmd('setup.py', 'install')
AssertionError
manatlan@manatlan-desktop:~/Documents$
}}}

With python2.6.4. on ubuntu 9.10, "setuptools" is not provided as default.
so I had installed it before (3 days ago with "python-setuptools" 0.6c9-0ubuntu5 deb), to be able to use easy_install to install others packages.

same problem on my 2 computers with Ubuntu karmic 9.10, and python-setuptools

Comments (6)

  1. Cliff Dyer

    The new script seemed to work for me. I hit a slightly different error, also on Karmic (64bit)

    ~/projects $ virtualenv dist_dev
    New python executable in dist_dev/bin/python
    Installing setuptools............done.
    ~/projects$ . ./dist_dev/bin/activate
    (dist_dev)~/projects$ pip -E dist_dev install distribute
    [...]
    NameError: name 'install' is not defined
    (dist_dev)jcdyer@aalcdl07:~/projects$ python distribute_setup_dev.py
    Extracting in /tmp/tmpJioPgZ
    Now working in /tmp/tmpJioPgZ/distribute-0.6.9dev
    Installing Distribute
    [...]
    (success!)
    
  2. Anonymous

    it works now ! great !

    ...
    manatlan@manatlan-desktop:~$ sudo apt-get install python-setuptools 
    ...
    Paramétrage de python-setuptools (0.6c9-0ubuntu5) ...
    
    manatlan@manatlan-desktop:~$ wget http://python-distribute.org/distribute_setup_dev.py
    --2009-11-11 20:15:12--  http://python-distribute.org/distribute_setup_dev.py
    Résolution de python-distribute.org... 88.191.12.35
    Connexion vers python-distribute.org|88.191.12.35|:80... connecté.
    requête HTTP transmise, en attente de la réponse... 200 OK
    Longueur: 14594 (14K) [text/x-python]
    Saving to: `distribute_setup_dev.py'
    
    100%[======================================>] 14 594      --.-K/s   in 0,07s   
    
    2009-11-11 20:15:12 (214 KB/s) - « distribute_setup_dev.py » sauvegardé [14594/14594]
    
    manatlan@manatlan-desktop:~$ sudo python distribute_setup_dev.py 
    Downloading http://python-distribute.org/distribute-0.6.9dev.tar.gz
    ...
    Processing distribute-0.6.9dev-py2.6.egg
    creating /usr/local/lib/python2.6/dist-packages/distribute-0.6.9dev-py2.6.egg
    Extracting distribute-0.6.9dev-py2.6.egg to /usr/local/lib/python2.6/dist-packages
    Adding distribute 0.6.9dev to easy-install.pth file
    Installing easy_install script to /usr/local/bin
    Installing easy_install-2.6 script to /usr/local/bin
    
    Installed /usr/local/lib/python2.6/dist-packages/distribute-0.6.9dev-py2.6.egg
    Processing dependencies for distribute==0.6.9dev
    Finished processing dependencies for distribute==0.6.9dev
    After install bootstrap.
    Creating /usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg-info
    Creating /usr/local/lib/python2.6/dist-packages/setuptools.pth
    manatlan@manatlan-desktop:~$ 
    
  3. Tarek Ziadé repo owner

    @Cliff Dyer

    there seem to be a problem with pip bootstraping within a virtualenv. I suggest that you use the script provided instead, until we fixed that.

    I am closing this bug, and opening a new one about pip.

    Thanks

  4. Log in to comment