Debian Bug report logs - #840084
python-virtualenv: “Multiple .dist-info directories” when creating virtualenv

version graph

Package: python-virtualenv; Maintainer for python-virtualenv is Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>; Source for python-virtualenv is src:python-virtualenv (PTS, buildd, popcon).

Reported by: Ben Finney <bignose@debian.org>

Date: Sat, 8 Oct 2016 06:06:05 UTC

Severity: normal

Found in version python-virtualenv/15.0.3+ds-2

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#840084; Package python-virtualenv. (Sat, 08 Oct 2016 06:06:07 GMT) (full text, mbox, link).


Acknowledgement sent to Ben Finney <bignose@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Sat, 08 Oct 2016 06:06:07 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Ben Finney <bignose@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python-virtualenv: “Multiple .dist-info directories” when creating virtualenv
Date: Sat, 8 Oct 2016 16:58:52 +1100
[Message part 1 (text/plain, inline)]
Package: python-virtualenv
Version: 15.0.3+ds-2
Severity: normal

When attempting to create a new virtualenv, Pip crashes with an error:

=====
$ python2 -m pip --version
pip 8.1.2 from /usr/lib/python2.7/dist-packages (python 2.7)
$ python2 -m virtualenv --version
15.0.3

$ VENV="$(mktemp -d)"
$ python2 -m virtualenv "$VENV"
[…]
Installing collected packages: setuptools, pkg-resources, pip, wheel
Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/pip-8.1.2-py2.py3-none-any.whl/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  […]
  File "/usr/share/python-wheels/pip-8.1.2-py2.py3-none-any.whl/pip/wheel.py", line 306, in clobber
    ', '.join(info_dir))
AssertionError: Multiple .dist-info directories: /tmp/tmp.hMBSljwiON/lib/python2.7/site-packages/setuptools-28.3.0.dist-info, /tmp/tmp.hMBSljwiON/lib/python2.7/site-packages/setuptools-25.1.6.dist-info
[…]

$ ls /tmp/tmp.hMBSljwiON/lib/python2.7/site-packages/setuptools-28.3.0.dist-info
ls: cannot access '/tmp/tmp.hMBSljwiON/lib/python2.7/site-packages/setuptools-28.3.0.dist-info': No such file or directory
$ ls /tmp/tmp.hMBSljwiON/lib/python2.7/site-packages/setuptools-25.1.6.dist-info
ls: cannot access '/tmp/tmp.hMBSljwiON/lib/python2.7/site-packages/setuptools-25.1.6.dist-info': No such file or directory
=====

As you can see, it complains about “multiple .dist-info directories”
that didn't exist before the command, and don't exist afterward.

(Full session output attached to this message.)

The behaviour is the same if I use ‘python3 -m virtualenv’.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.7.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_AU.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-virtualenv depends on:
ii  python                2.7.11-2
ii  python-pip-whl        8.1.2-2
ii  python-pkg-resources  28.0.0-1

Versions of packages python-virtualenv recommends:
ii  virtualenv  15.0.3+ds-2

python-virtualenv suggests no packages.

-- no debconf information

-- 
 \                         “I doubt, therefore I might be.” —anonymous |
  `\                                                                   |
_o__)                                                                  |
Ben Finney <bignose@debian.org>
[virtualenv-create.2016-10-08T16.29.43.txt (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#840084; Package python-virtualenv. (Tue, 18 Oct 2016 16:09:03 GMT) (full text, mbox, link).


Acknowledgement sent to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Tue, 18 Oct 2016 16:09:03 GMT) (full text, mbox, link).


Message #10 received at 840084@bugs.debian.org (full text, mbox, reply):

From: Barry Warsaw <barry@debian.org>
To: python-modules-team@lists.alioth.debian.org
Cc: Ben Finney <bignose@debian.org>, 840084@bugs.debian.org
Subject: Re: [Python-modules-team] Bug#840084: python-virtualenv: “Multiple .dist-info directories” when creating virtualenv
Date: Tue, 18 Oct 2016 11:57:22 -0400
[Message part 1 (text/plain, inline)]
On Oct 08, 2016, at 04:58 PM, Ben Finney wrote:

>When attempting to create a new virtualenv, Pip crashes with an error:

I can't reproduce this on unstable.

% python2 -m pip --version
pip 8.1.2 from /usr/lib/python2.7/dist-packages (python 2.7)
% python2 -m virtualenv --version
15.0.3

% python2 -m virtualenv /tmp/p2
Already using interpreter /usr/bin/python2
New python executable in /tmp/p2/bin/python2
Also creating executable in /tmp/p2/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.

% python3 -m virtualenv /tmp/p3
Running virtualenv with interpreter /usr/bin/python2
New python executable in /tmp/p3/bin/python2
Also creating executable in /tmp/p3/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.

Something Else must be going on in your environment.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#840084; Package python-virtualenv. (Tue, 01 Nov 2016 18:51:02 GMT) (full text, mbox, link).


Acknowledgement sent to Ben Finney <bignose@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Tue, 01 Nov 2016 18:51:02 GMT) (full text, mbox, link).


Message #15 received at 840084@bugs.debian.org (full text, mbox, reply):

From: Ben Finney <bignose@debian.org>
To: Barry Warsaw <barry@debian.org>
Cc: python-modules-team@lists.alioth.debian.org, 840084@bugs.debian.org
Subject: Re: [Python-modules-team] Bug#840084: python-virtualenv: “Multiple .dist-info directories” when creating virtualenv
Date: Wed, 2 Nov 2016 05:39:50 +1100
[Message part 1 (text/plain, inline)]
On 18-Oct-2016, Barry Warsaw wrote:

> % python2 -m virtualenv /tmp/p2
> Already using interpreter /usr/bin/python2
> New python executable in /tmp/p2/bin/python2
> Also creating executable in /tmp/p2/bin/python
> Installing setuptools, pkg_resources, pip, wheel...done.

The difference turns out to be that, on the host where I encounter
this bug's behaviour, Pip has a build directory with some older build
artefacts remaining.

So this is an expression of the fact Pip seems unable to deal
gracefully with that, surely normal, condition.

When I clear the build directory (and there is another bug here, in
that the above error message gives no indication this is something
that needs to be done, or where to look), Pip no longer complains
about “Multiple .dist-info directories”, and successfully creates the
virtualenv as requested.

That shouldn't be needed, though. Surely the build directory should be
treated as a cache of generated files, and not impede future builds.

-- 
 \      “If you can't beat them, arrange to have them beaten.” —George |
  `\                                                            Carlin |
_o__)                                                                  |
Ben Finney <bignose@debian.org>
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jan 6 05:13:17 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.