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: ImportError: cannot import name 'compatible_tags'...

See original GitHub issue
  • pip version: 20.0.2-1
  • Python version: 3.8.2
  • Operating system: ArchLinux

Running pip3 always fails and dumps an error:

Traceback (most recent call last):
  File "/usr/bin/pip3", line 11, in <module>
    load_entry_point('pip==20.0.2', 'console_scripts', 'pip3')()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2862, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2453, in load
    return self.resolve()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2459, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/usr/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 28, in <module>
    from pip._internal.models.target_python import TargetPython
  File "/usr/lib/python3.8/site-packages/pip/_internal/models/target_python.py", line 3, in <module>
    from pip._internal.pep425tags import get_supported, version_info_to_nodot
  File "/usr/lib/python3.8/site-packages/pip/_internal/pep425tags.py", line 7, in <module>
    from pip._vendor.packaging.tags import (
ImportError: cannot import name 'compatible_tags' from 'pip._vendor.packaging.tags' (/usr/lib/python3.8/site-packages/packaging/tags.py)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
Qualpheycommented, May 19, 2020

I’ve installed pip using the get-pip.py script, and this issue was gone.

5reactions
hongquancommented, May 19, 2020

@deveshks

The issue has gone in pip 20.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error after upgrading pip: cannot import name 'main'
Whenever I am trying to install any package using pip, I am getting this import error: guru@ ...
Read more >
Running Pip3 ImportError: cannot import name 'main'
The python pip script is prepared by Debian --The comment says: Run the main entry point, similarly to how setuptools does it, but...
Read more >
Error after upgrading pip cannot import name main - Edureka
Whenever I am trying to install any package using pip, I am getting this import error: dey@niroj-notebook:~$ pip3 install numpy Traceback ...
Read more >
pip commands fail with ImportError cannot import ... - SUSE
SUSE Support. Here When You Need Us. pip commands fail with ImportError cannot import name 'FormatControl'.
Read more >
Error: cannot import name 'compatible_tags' - Launchpad Bugs
This was reported in upstream: https://github.com/pypa/pip/issues/8260, but it is proven to be mistake of distro package. I can verify that.
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