How to remove pip package after deleting it manually

前端 未结 4 1910
孤街浪徒
孤街浪徒 2020-12-13 06:02

I deleted a pip package with rm -rf command thinking that the package will be removed. Now the package has been deleted but it still shows up in pip list<

4条回答
  •  [愿得一人]
    2020-12-13 06:33

    1. Go to the site-packages directory where pip is installing your packages.
    2. You should see the egg file that corresponds to the package you want to uninstall. Delete the egg file (or, to be on the safe side, move it to a different directory).
    3. Do the same with the package files for the package you want to delete (in this case, the psycopg2 directory).
    4. pip install YOUR-PACKAGE

提交回复
热议问题