本文介绍了无法卸载名为`-umpy`的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Runnig py -m pip list会产生:

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

Package         Version
--------------- -------
-umpy           1.15.4
autogui         0.1.8
beautifulsoup4  4.8.0
cycler          0.10.0
et-xmlfile      1.0.1
...and so on

如您所见,有一个名为-umpy的软件包,它必须是某种计算机打.

as you can see there is a package named -umpy which must be some kind of a computer hiccup.

现在我想卸载该软件包,但是py -m pip uninstall -umpy命令不起作用,因为它认为我正在尝试传递参数.

Now I want to uninstall this package but the py -m pip uninstall -umpy command does not work since it thinks I am trying to pass an argument..

有人知道如何摆脱此软件包吗?

我已经尝试过各种逃生方法:

I have already tried various escapes:

>> py -m pip uninstall /-umpy
ERROR: Invalid requirement: '/-umpy'

>> py -m pip uninstall `-umpy
Usage:
  C:\Program Files\Python35\python.exe -m pip uninstall [options] <package> ...
  C:\Program Files\Python35\python.exe -m pip uninstall [options] -r <requirements file> ...

no such option: -u

>> py -m pip uninstall \-umpy
ERROR: Invalid requirement: '\\-umpy'
Hint: It looks like a path. File '\-umpy' does not exist.

>> py -m pip uninstall "-umpy"
Usage:
  C:\Program Files\Python35\python.exe -m pip uninstall [options] <package> ...
  C:\Program Files\Python35\python.exe -m pip uninstall [options] -r <requirements file> ...

no such option: -u

推荐答案

尝试

py -m pip uninstall -- -umpy

双破折号将选项与非选项分开;完全是这样用的.

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

顺便说一句,我认为-umpy不是真正的软件包.看来这是由于软件包numpy卸载失败而遗留下来的.

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

可能是您需要手动删除其目录.为此,请键入py -m pip list -v以获得所有已安装模块及其安装位置的列表,然后只需删除相应的文件夹即可.

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.

这篇关于无法卸载名为`-umpy`的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-17 21:03