Unable to uninstall package named `-umpy`

后端 未结 2 806
予麋鹿
予麋鹿 2021-01-23 07:39

Runnig py -m pip list in windows powershell, produces:

Package         Version
--------------- -------
-umpy           1.15.4
autogui         0.1.8
         


        
相关标签:
2条回答
  • 2021-01-23 08:03
    import subprocess
    print((bytes(subprocess.check_output(['pip', 'uninstall', '-umpy'], stderr=subprocess.STDOUT)).decode()))
    

    To automate it in a python script.

    0 讨论(0)
  • 2021-01-23 08:08

    Try

    py -m pip uninstall -- -umpy
    

    Double dashes separate options from non-options; used exactly in case like this.

    BTW, I don't think -umpy is a real package. It seems it's a leftover from an unsuccessful uninstallation of a package numpy.

    It could be you need to remove its directories manually. To do that, type py -m pip list -v to get a list of all installed modules together with their installation location and then simply delete the corresponding folders.

    0 讨论(0)
提交回复
热议问题