[TIP] Initial ‘tox’ invocation fails: “AssertionError: Multiple .dist-info directories”

Ben Finney ben+python at benfinney.id.au
Tue Mar 22 23:19:49 PDT 2016

Howdy all,

A simple ‘tox’ configuration following the documentation is failing with
an error.

Having installed ‘tox’ (version 2.3.1, which is the version in Debian
Stretch now), I make a ‘tox.ini’ file:

$ cat ./tox.ini | grep -v '^#'

envlist = py27, py34, py35

commands =
    {envpython} -m unittest discover
deps =

commands =
    {envpython} -m unit2 discover
deps =

Then when I run ‘tox’ in the same directory, it fails to set up the

$ tox
py35 create: /home/bignose/Projects/python/manpage/trunk/.tox/py35
ERROR: invocation failed (exit code 1), logfile: /home/bignose/Projects/python/manpage/trunk/.tox/py35/log/py35-0.log
ERROR: actionid: py35
msg: getenv
cmdargs: ['/usr/bin/python3', '-m', 'virtualenv', '--python', '/usr/bin/python3.5', 'py35']
env: […]

Using base prefix '/usr'
New python executable in py35/bin/python3.5
Also creating executable in py35/bin/python
Please make sure you remove any previous custom paths from your /home/bignose/.pydistutils.cfg file.
Installing setuptools, pip...
  Complete output from command /home/bignose/Projec...x/py35/bin/python3.5 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
  DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated.  See https://github.com/pypa/pip/issues/906.
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking setuptools
Downloading/unpacking pip
Installing collected packages: setuptools, pip
Cleaning up...
Traceback (most recent call last):
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/commands/install.py", line 295, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/req.py", line 1436, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/req.py", line 672, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/req.py", line 902, in move_wheel_files
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/wheel.py", line 214, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/share/python-wheels/pip-1.5.6-py2.py3-none-any.whl/pip/wheel.py", line 192, in clobber
    assert not info_dir, 'Multiple .dist-info directories'
AssertionError: Multiple .dist-info directories

Storing debug log for failure in /home/bignose/.pip/pip.log
...Installing setuptools, pip...done.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 2378, in <module>
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 830, in main
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 1032, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 975, in install_wheel
    'PIP_NO_INDEX': '1'
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 917, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/bignose/Projec...x/py35/bin/python3.5 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 2
Running virtualenv with interpreter /usr/bin/python3.5

ERROR: InvocationError: /usr/bin/python3 -m virtualenv --python /usr/bin/python3.5 py35 (see /home/bignose/Projects/python/manpage/trunk/.tox/py35/log/py35-0.log)

Nothing in the “Basic example” or the issue tracker gives me any clues
about this.

What is wrong here? What needs to be done to get this working with the
Debian-installed ‘tox’ package?

 \      “At my lemonade stand I used to give the first glass away free |
  `\          and charge five dollars for the second glass. The refill |
_o__)                            contained the antidote.” —Emo Philips |
Ben Finney

More information about the testing-in-python mailing list