0

I am in a conda virtual environment(windows) using Anaconda prompt.

I have accidentally run

pip uninstall pip

In order to reinstall it, I have run

conda install pip

it responds with

Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

But if I type pip, it says it is not a known command.

How can reinstall pip in this virtual envirmonment?

Tms91
  • 3,456
  • 6
  • 40
  • 74

2 Answers2

2

Solved by running

conda uninstall pip

and then

conda install pip

It seems that when pip uninstall itself, it does not accomplish the task completely,
so it can't work, but if you just run

conda install pip

Anaconda says it is already installed, as some of its files still exist, as probably Anaconda gets them as proof of pip being already installed. That is why one must completely uninstall pip before attempting to reinstall it.

Tms91
  • 3,456
  • 6
  • 40
  • 74
-3

The simplest solution to this would be to uninstall whichever python you have and re install Python 3.4+. This will include pip.

Dharman
  • 30,962
  • 25
  • 85
  • 135
satish cc
  • 21
  • 6