How to fix ModuleNotFoundError: No module named 'pip._internal' after facing permission denied

I found a fix for the problem How to fix ModuleNotFoundError: No module named 'pip._internal' with python source code installation. However, I just created a Slackoverflow account and can't add a comment. Thus, I create this new thread to propose a solution.

(MacOS) Problem: executing the following commands fail

  • sudo pip uninstall pip
  • sudo pip3 --version
  • sudo python3 get-pip.py --force-reinstall
  • sudo python3 -m pip install --upgrade pip

Error Message: You'd see one of the following errors

  • ModuleNotFoundError: No module named 'pip._internal.commands'
  • ModuleNotFoundError: No module named 'pip._internal.cli'
  • No module named pip.main; 'pip' is a package and cannot be directly executed

Solution is. in the comments



Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)