-1

I foolishly ran:

python3 -m pip install -r requirements.txt

outside the intended virtual environment. Now my global environment has everything in requirements.txt

Is there a straightforward way to undo this? This issue was raised here, but no real answer was provided as to how to reverse this.

phd
  • 69,888
  • 11
  • 97
  • 133
rhz
  • 780
  • 8
  • 19
  • Alas there is no simple way. See https://stackoverflow.com/a/41017868/7976758 Found in https://stackoverflow.com/search?q=%5Bpip%5D+uninstall+everything+installed – phd Apr 13 '22 at 01:13
  • https://stackoverflow.com/a/15708711/7976758 Or may be simply `pip freeze | xargs pip uninstall -y` – phd Apr 13 '22 at 01:14

1 Answers1

-1

Solution

Run below command in global environement, where you ran the installation command by mistake.

pip uninstall -r requirements.txt -y

DataFramed
  • 1,024
  • 11
  • 18
  • This doesn't uninstall dependencies and dependencies of dependencies recursively. – phd Apr 13 '22 at 02:22