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.

pip3 install docker exception AttributeError: _DistInfoDistribution__dep_map Fedora 34

See original GitHub issue

Description

pip 20.2.2, Python 3.7.3, Fedora 34, running pip3 install docker results in the below:

pip3 install docker
Collecting docker
  Downloading docker-5.0.3-py2.py3-none-any.whl (146 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 146 kB 18.9 MB/s
Requirement already satisfied: requests!=2.18.0,>=2.14.2 in /usr/local/bin/anaconda3/lib/python3.7/site-packages (from docker) (2.26.0)
Collecting websocket-client>=0.32.0
  Downloading websocket_client-1.2.1-py2.py3-none-any.whl (52 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 52 kB 3.4 MB/s
Requirement already satisfied: idna<4,>=2.5; python_version >= "3" in /usr/local/bin/anaconda3/lib/python3.7/site-packages (from requests!=2.18.0,>=2.14.2->docker) (2.10)
Requirement already satisfied: charset-normalizer~=2.0.0; python_version >= "3" in /usr/local/bin/anaconda3/lib/python3.7/site-packages (from requests!=2.18.0,>=2.14.2->docker) (2.0.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/bin/anaconda3/lib/python3.7/site-packages (from requests!=2.18.0,>=2.14.2->docker) (1.25.10)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/bin/anaconda3/lib/python3.7/site-packages (from requests!=2.18.0,>=2.14.2->docker) (2020.6.20)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
    return self.__dep_map
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3012, in _parsed_pkg_info
    return self._pkg_info
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 535, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 50, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
    dm = self._dep_map
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3032, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3014, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1420, in get_metadata
    value = self._get(path)
  File "/usr/local/bin/anaconda3/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1616, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/anaconda3/lib/python3.7/site-packages/toml-0.10.1.dist-info/METADATA'
Installing collected packages: websocket-client, docker
Successfully installed docker-5.0.3 websocket-client-1.2.1

Expected behavior

no error

pip version

20.2.2

Python version

3.7.7

OS

Fedora 34

How to Reproduce

pip3 install docker

Output

No response

Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
RobbieTheKcommented, Oct 8, 2021

This may be caused by a badly installed ruamel-yaml (via distutils). Can you try to delete it and try again?

Yes had to rm /usr/local/bin/anaconda3/lib/python3.7/site-packages/ruamel_yaml-0.15.87-py3.7.egg-info and rm -rf /usr/local/bin/anaconda3/lib/python3.7/site-packages/ruamel_yaml then reinstall worked.

0reactions
DiddiLeijacommented, Oct 8, 2021

This may be caused by a badly installed ruamel-yaml (via distutils). Can you try to delete it and try again?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install Docker Engine on Fedora
To install Docker Engine, you need the 64-bit version of one of these Fedora versions: Fedora 34; Fedora 35; Fedora 36. Uninstall old...
Read more >
Issues with docker-py and Ubuntu 14.04 #34065 - GitHub
I have docker-py installed. ssh-ing into the minion I can run the following: $ sudo python Python 2.7.6 (default, Jun 22 2015, 17:58Β ......
Read more >
Why is Docker installed but not Docker Compose?
sudo apt-get -y install python-pip sudo pip install docker-compose ... In case on RHEL based distro / Fedora: $ sudo dnf install docker-compose....
Read more >
Getting started with Docker on Fedora
Installation. Install the docker-ce package using the Docker repository: To install the dnf-plugins-core package (which provides the commands to manage yourΒ ...
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