Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFound #11173

Closed
fossildoc opened this issue Jun 8, 2022 · 5 comments
Closed

ModuleNotFound #11173

fossildoc opened this issue Jun 8, 2022 · 5 comments

Comments

@fossildoc
Copy link

fossildoc commented Jun 8, 2022

Describe the bug
Any type of pip install, including --upgrade of pip itself, always results in the same error:
ModuleNotFoundError: No module named 'pip._internal.vcs.mercurial'

Here is the entire output when I tried to run pip install pudb. Notice it uses python3.9 site packages, but if I run it with python3.8 -m pip install pudb, I get exactly the same thing, but with python3.8 site packages.

Traceback (most recent call last):
  File "/home/richard/.local/bin/pip", line 8, in <module>
    sys.exit(main())
  File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 68, in main
    command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
  File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/commands/__init__.py", line 109, in create_command
    module = importlib.import_module(module_path)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 14, in <module>
    from pip._internal.cli.req_command import (
  File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
    from pip._internal.index.collector import LinkCollector
  File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 42, in <module>
    from pip._internal.network.session import PipSession
  File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 31, in <module>
    from pip._internal.network.auth import MultiDomainBasicAuth
  File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/network/auth.py", line 22, in <module>
    from pip._internal.vcs.versioncontrol import AuthInfo
  File "/home/richard/.local/lib/python3.9/site-packages/pip/_internal/vcs/__init__.py", line 7, in <module>
    import pip._internal.vcs.mercurial
ModuleNotFoundError: No module named 'pip._internal.vcs.mercurial'

My Platform
Ubuntu 20.04

@di di transferred this issue from pypi/warehouse Jun 8, 2022
@pradyunsg pradyunsg added S: needs triage Issues/PRs that need to be triaged and removed bug 🐛 labels Jun 10, 2022
@PythonCoderAS
Copy link

How did you install pip?

@DiddiLeija
Copy link
Member

This might be related to #5599, but I'm not sure at all. If not, we need more information about the way you installed pip, as @PythonCoderAS suggested.

@fossildoc
Copy link
Author

I install pip like this:
sudo apt update
sudo apt install python3-pip

@fossildoc
Copy link
Author

I cannot install anything at all using pip. I always get the mercurial message.

@uranusjr
Copy link
Member

uranusjr commented Aug 9, 2022

If you use apt you should report to your OS provider (e.g. Ubuntu).

@uranusjr uranusjr closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2022
@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants