question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AssertionError: Multiple .dist-info directories

See original GitHub issue

The error is very confusing and doesn’t include any hint on which is the real problem, which are the “multiple” ones, these are not listed even in the pip.log

pip install --user python3-ldap
Downloading/unpacking python3-ldap
  Downloading python3_ldap-0.9.5.2-py2.py3-none-any.whl (136kB): 136kB downloaded
Requirement already satisfied (use --upgrade to upgrade): pyasn1==0.1.7 in /Users/sorins/Library/Python/2.7/lib/python/site-packages (from python3-ldap)
Installing collected packages: python3-ldap
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/Library/Python/2.7/site-packages/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 193, in clobber
    assert not info_dir, 'Multiple .dist-info directories'
AssertionError: Multiple .dist-info directories

Storing debug log for failure in /Users/sorins/Library/Logs/pip.log

http://pastebin.com/fqz89aUM

/Library/Python/2.7/site-packages $ ls -w
Jinja2-2.7.3-py2.7.egg-info     coverage-3.7.1-py2.7.egg-info       pip-1.5.6-py2.7.egg-info        pytest_pep8.py              sqlalchemy
MarkupSafe-0.23-py2.7.egg-info      docutils                py                  pytest_pep8.pyc             teamcity
Pygments-1.6-py2.7.egg-info     docutils-0.11-py2.7.egg-info        py-1.4.22-py2.7.egg-info        pytest_pycharm-0.1.0-py2.7.egg-info teamcity_messages-1.8-py2.7.egg-info
README                  easy-install.pth            pygments                pytest_pycharm.py           tlslite
SQLAlchemy-0.9.6-py2.7.egg-info     execnet                 pytest-2.6.0-py2.7.egg-info     pytest_pycharm.pyc          tlslite-0.4.6-py2.7.egg-info
Sphinx-1.2.2-py2.7.egg-info     execnet-1.2.0-py2.7.egg-info        pytest.py               pytest_xdist-1.10-py2.7.egg-info    vboxapi
_pytest                 jinja2                  pytest.pyc              requests                vboxapi-1.0-py2.7.egg-info
activedirectory-0.0.7-py2.7.egg-info    markupsafe              pytest_cache-1.0-py2.7.egg-info     requests-2.3.0.dist-info        virtualenv-1.11.6.dist-info
cov_core-1.13.0-py2.7.egg-info      pep8-1.5.7.dist-info            pytest_cache.py             requests_oauthlib           virtualenv.py
cov_core.py             pep8.py                 pytest_cache.pyc            requests_oauthlib-0.4.1.dist-info   virtualenv.pyc
cov_core.pyc                pep8.pyc                pytest_cov-1.7.0-py2.7.egg-info     six-1.7.2-py2.7.egg-info        virtualenv_support
cov_core_init.py            pg8000                  pytest_cov.py               six.py                  xdist
cov_core_init.pyc           pg8000-1.9.11-py2.7.egg-info        pytest_cov.pyc              six.pyc                 xmlrunner
coverage                pip                 pytest_pep8-1.0.6-py2.7.egg-info    sphinx                  xmlrunner-1.7.5-py2.7.egg-info
~/Library/Python/2.7/lib/python/site-packages $ ls -w
IPython                          filemagic-1.6-py2.7.egg-info     mock-1.0.1-py2.7.egg-info        pkg_resources.py                 readline.py                      tox-1.7.2-py2.7.egg-info
_markerlib                       gnureadline-6.3.3-py2.7.egg-info mock.py                          pkg_resources.pyc                readline.pyc                     wheel
autopep8-1.0.3-py2.7.egg-info    gnureadline.so                   mock.pyc                         pyasn1                           setuptools                       wheel-0.24.0.dist-info
autopep8.py                      ipython-2.1.0.dist-info          nose                             pyasn1-0.1.7-py2.7.egg-info      setuptools-5.4.1.dist-info       yanc
autopep8.pyc                     jira                             nose-1.3.3-py2.7.egg-info        pypyodbc-1.3.3-py2.7.egg-info    tendo                            yanc-0.2.4-py2.7.egg-info
easy_install.py                  jira-0.29.dist-info              oauthlib                         pypyodbc.py                      tendo-0.2.6-py2.7.egg-info
easy_install.pyc                 magic                            oauthlib-0.6.3-py2.7.egg-info    pypyodbc.pyc                     tox

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
bignose-debiancommented, Oct 8, 2016

This continues to occur.

$ 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, in Pip version 8.1.2, it complains about “multiple .dist-info directories” that didn’t exist before the command, and don’t exist afterward.

Full session output for the above demonstration.

3reactions
pfmoorecommented, Apr 13, 2016

The change should be in the next release of pip (whenever that gets released).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple .dist-info directories on Data Science Experience ...
The Python 3.5 kernel on DSX specifies a build directory for pip by setting the ... The multiple dist-info directories are there:
Read more >
ensurepip "AssertionError: Multiple .dist-info directories"
I am installing python 3.4 on OS X 10.9 Mavericks via Homebrew.
Read more >
python3-pip: Virtualenv creation fails: “AssertionError: ...
Debian Bug report logs - #819037 python3-pip: Virtualenv creation fails: “AssertionError: Multiple .dist-info directories”. version graph.
Read more >
Pip Uninstall and Install same package gives 'AssertionError
I am having trouble installing and installing again the same package. I get an 'AssertionError: Multiple .dist-info directories' error.
Read more >
AssertionError: importlib-metadata .dist-info directory not ...
AssertionError : importlib-metadata .dist-info directory not found · ImportError: No module named click · pip install click · pip install --upgrade ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found