Hi Liam,

                Sorry for the trouble. The cause is rooted in the latest updates to Setuptools and Distribute on PyPI which were launched today.

 

                I believe what’s happening here is pip is installing Distribute 0.7, which triggers the uninstallation of Distribute, but Distribute 0.7 (a compatibility wrapper) depends on a setuptools module to be in place to install.

 

                I’m unsure about the failed rollback. That looks like a separate issue in pip.

 

                Based on your report, I’m going to remove the Distribute-0.7 wrapper from PyPI until this issue is resolved. That is done.

 

                In order to repair those envs, you may simply be able to re-run the chef code over the environments and they may repair naturally. If they don’t, you may need to re-initialize the virtualenv (run virtualenv again on that path) in order to revive distribute in that environment.

 

                I hope the pip or virtualenv maintainers can comment as well.

 

Regards,

Jason

 

From: Distutils-SIG [mailto:distutils-sig-bounces+jaraco=jaraco.com@python.org] On Behalf Of Liam Kirsher
Sent: Sunday, 09 June, 2013 13:24
To: distutils-sig@python.org
Subject: [Distutils] Setuptools/Distribute error with 0.7.2

 

Hi --
I'm hoping for some help with an error I'm suddenly getting with distribute, setuptools.
It had been working fine, and seemingly overnight it stopped working.  I really don't think I changed anything.
This is part of a chef recipe, which also installs virtualenv.
It appears that a new version 0.7.2 is downloaded, but it fails to install, and then the rollback fails, as well.

Not sure quite what is wrong here and how to fix it!

Liam


Using version 0.7.2 (newest of versions: 0.7.2, 0.7.2, 0.7.1, 0.7)
  Downloading from URL https://pypi.python.org/packages/source/s/setuptools/setuptools-0.7.2.tar.gz#md5=de44cd90f8a1c713d6c2bff67bbca65d (from https://pypi.python.org/simple/setuptools/)
  Running setup.py egg_info for package setuptools

    running egg_info
    creating pip-egg-info/setuptools.egg-info
    writing requirements to pip-egg-info/setuptools.egg-info/requires.txt
    writing pip-egg-info/setuptools.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/setuptools.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/setuptools.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/setuptools.egg-info/entry_points.txt
    writing requirements to pip-egg-info/setuptools.egg-info/requires.txt
    writing pip-egg-info/setuptools.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/setuptools.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/setuptools.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/setuptools.egg-info/entry_points.txt
    writing manifest file 'pip-egg-info/setuptools.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found
    

    reading manifest file 'pip-egg-info/setuptools.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/setuptools.egg-info/SOURCES.txt'
  Source in /tmp/pip-build-root/setuptools has version 0.7.2, which satisfies requirement setuptools>=0.7 (from distribute->supervisor)
  skipping extra ssl:sys_platform=='win32'
  skipping extra ssl:sys_platform=='win32' and python_version=='2.4'
  skipping extra certs
  skipping extra ssl:python_version in '2.4, 2.5'
Installing collected packages: distribute, setuptools

  Found existing installation: distribute 0.6.45

    Uninstalling distribute:

      Removing file or directory /usr/local/lib/python2.7/dist-packages/distribute-0.6.45-py2.7.egg
      Removing pth entries from /usr/local/lib/python2.7/dist-packages/easy-install.pth:
      Removing entry: ./distribute-0.6.45-py2.7.egg
      Successfully uninstalled distribute

  Running setup.py install for distribute

    Running command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/distribute/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5tzG3v-record/install-record.txt --single-version-externally-managed
    Traceback (most recent call last):

      File "<string>", line 1, in <module>

    ImportError: No module named setuptools

    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/distribute/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5tzG3v-record/install-record.txt --single-version-externally-managed:

    Traceback (most recent call last):

  File "<string>", line 1, in <module>

ImportError: No module named setuptools

----------------------------------------

  Rolling back uninstall of distribute

  Replacing /usr/local/lib/python2.7/dist-packages/distribute-0.6.45-py2.7.egg
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 271, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1189, in install
    requirement.rollback_uninstall()
  File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 500, in rollback_uninstall
    self.uninstalled.rollback()
  File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1537, in rollback
    pth.rollback()
AttributeError: 'str' object has no attribute 'rollback'



-- 
Liam Kirsher
PGP: http://liam.numenet.com/pgp/