How to solve ModuleNotFoundError in Anaconda Prompt

Viewed 99

I'm trying to upgrade my pip and other libraries but this error kept appearing. What is this about? I'm thinking that I might be in the wrong directory, but I tried running it on Anaconda directory and still the same error keep showing.

How do I solve this? What directory should I be in?

(base) C:\Users\BINTANG>pip install --upgrade pip
Traceback (most recent call last):
  File "f:\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "f:\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "F:\anaconda3\Scripts\pip.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'pip'

EDIT

Tried this already:

enter image description here

1 Answers

It is likely that something went wrong in installation process after deleting pip as the command was upgrading pip.

Typing this command python -m ensurepip --upgrade might restore the pip and upgrade it.

Related