GVKun编程网logo

MacOS使用pip安装pandas提示Cannot uninstall ''numpy''解决方案(pip安装pandas报错)

5

在这篇文章中,我们将为您详细介绍MacOS使用pip安装pandas提示Cannotuninstall''numpy''解决方案的内容,并且讨论关于pip安装pandas报错的相关问题。此外,我们还会

在这篇文章中,我们将为您详细介绍MacOS使用pip安装pandas提示Cannot uninstall ''numpy''解决方案的内容,并且讨论关于pip安装pandas报错的相关问题。此外,我们还会涉及一些关于Anaconda 3 下载错误,只下载 3 个地图 - 只有 conda-meta、Lib、pkgs、_conda.exe 和 Uninstall-Anaconda3.exe、apt uninstall 相关、Completely Uninstall Node.js from Mac OS X、dotnet-core-uninstall 无法从命令行运行的知识,以帮助您更全面地了解这个主题。

本文目录一览:

MacOS使用pip安装pandas提示Cannot uninstall ''numpy''解决方案(pip安装pandas报错)

MacOS使用pip安装pandas提示Cannot uninstall ''numpy''解决方案(pip安装pandas报错)

本人在重新搭建自己的电脑的plotly环境的时候遇到一个坑,就是使用pip安装pandas的时候一直提示:

pip uninstall numpy
Cannot uninstall ''numpy''. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

由于英文水平有限,期初以为是权限不够,加上sudo依然报错。在借助工具翻译了之后,发现是无法卸载numpy,原因如下:

这是一个distutils安装的项目,因此我们无法准确确定哪些文件属于它,这将导致仅部分卸载。

原来numpy是标准库的东西,让我想起window系统里面有些软件安装时候会放在system文件夹下,导致提示无法准确识别需要卸载删除的文件导致卸载失败的情况。虽然不清楚为啥装pandas需要先卸载numpy,但是使用pip先安装了一波。提示如下:

Requirement already satisfied: numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.8.0rc1)

还是不行,干脆直接删除了。提醒一下先备份,然后在安装重新安装numpy,这样保险一些。

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python$ ls | grep numpy
numpy-1.8.0rc1-py2.7.egg-info
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python$ sudo mv numpy-1.8.0rc1-py2.7.egg-info /Users/fv/
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python$

下面放一下我安装命令,用的源是清华的,豆瓣的老提示连接失败。

sudo pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple numpy
sudo pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple pandas
划重点,还有一些坑:
看国外网友是3.+的版本bug比较多,我果然滚回来2.4
新电脑一定要注意相关依赖库的版本,有时候plotly提示找不到模块,只是因为版本太低了。

欢迎有兴趣的童鞋一起交流

Anaconda 3 下载错误,只下载 3 个地图 - 只有 conda-meta、Lib、pkgs、_conda.exe 和 Uninstall-Anaconda3.exe

Anaconda 3 下载错误,只下载 3 个地图 - 只有 conda-meta、Lib、pkgs、_conda.exe 和 Uninstall-Anaconda3.exe

如何解决Anaconda 3 下载错误,只下载 3 个地图 - 只有 conda-meta、Lib、pkgs、_conda.exe 和 Uninstall-Anaconda3.exe

Anaconda 3下载错误,只下载3张地图 -仅 conda-Meta、Lib、pkgs、_conda.exe 和 Uninstall-Anaconda3.exe

一切正常,anaconda 运行良好,可以让 PyTorch 进入,但后来出现了一个不同的错误,我删除了 anaconda - 只需卸载。 现在我再次尝试安装,anaconda 3没有下载所有数据,也无法打开anaconda导航和终端

现在有人可能有什么问题吗?

apt uninstall 相关

apt uninstall 相关

Debian/Ubuntu 系统中使用 apt 包管理工具删除软件

参考 https://www.linuxfordevices.com/tutorials/ubuntu/uninstalling-packages-with-apt

$ dpkg --list | grep <package-name>

查询通过 apt 工具已安装的相关软件

$ dpkg -l | grep kube
ii  kubeadm                              1.22.4-00                         amd64        Kubernetes Cluster Bootstrapping Tool
ii  kubectl                              1.22.4-00                         amd64        Kubernetes Command Line Tool
ii  kubelet                              1.22.4-00                         amd64        Kubernetes Node Agent
ii  kubernetes-cni                       0.8.7-00                          amd64        Kubernetes CNI

apt remove

删除 kubeadm kubectl kubelet kubernetes-cni 保留配置

$ apt remove kubeadm kubectl kubelet kubernetes-cni

apt purge

删除 kubeadm kubectl kubelet kubernetes-cni 不保留配置

$ apt purge kubeadm kubectl kubelet kubernetes-cni

remove 和 purge 的区别

What’s the difference between ‘remove‘ and ‘purge‘ ?
So the begging question here is ‘remove‘ and ‘purge‘ and when to use what ?

The primary difference being ‘remove‘ and ‘purge‘ is that ‘remove‘ only gets rid of the package leaving any configuration files untouched. Whereas ‘purge‘ not only removes the package but also removes all configuration files OUTSIDE THE HOME DIRECTORY.

清理缓存

  • 清理缓存的安装包
$ sudo apt clean
  • 清理无用的安装包
$ sudo apt autoreclean
  • 清理系统认为无用的软件和安装包
$ sudo apt autoremove

Completely Uninstall Node.js from Mac OS X

Completely Uninstall Node.js from Mac OS X

安装:Nodejs V5.5.0

执行:sudo npm -v

报错:

Error: Cannot find module ''minimatch''
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/rimraf/node_modules/glob/glob.js:44:17)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)

解决: 彻底删除node和npm各个模块,重新安装

内容

Completely Uninstall Node.js from Mac OS X

The following is the best way to completely uninstall node + npm:

go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminal

check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:

sudo rm /usr/local/bin/npm
sudo rm /usr/local/share/man/man1/node.1
sudo rm /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm
sudo rm -rf ~/.node-gyp
sudo rm /opt/local/bin/node
sudo rm /opt/local/include/node
sudo rm -rf /opt/local/lib/node_modules

参考:

https://github.com/nodejs/node/issues/3922

http://benznext.com/completely-uninstall-node-js-from-mac-os-x/

dotnet-core-uninstall 无法从命令行运行

dotnet-core-uninstall 无法从命令行运行

如何解决dotnet-core-uninstall 无法从命令行运行

我正在阅读 C# 9.0 和 .NET 5 一书。在标题为“删除旧版本 .NET”的部分,它有几个命令来确保使用最新版本。

dotnet --list-sdks

dotnet --list-runtimes

两者都工作正常。

但是,当我运行命令时 dotnet-core-uninstall --all-previews-but-latest --sdk 我收到错误消息,指出 dotnet-core-uninstall 不是 cmdlet、函数、脚本文件或可运行程序的名称。

如果我将书中的命令调整为: dotnet -core-uninstall 我收到消息 ''unkNown option: -core-uninstall'' 后跟与 dotnet --help

相同的输出

同样,如果我运行 dotnet -core-uninstall --all-previews-but-latest --sdk,输出会告诉我 -core-uninstall、--all-previews-but-latest 和 --sdk 是未知选项。

然后我尝试从 Visual Studio 终端运行这些命令,但也没有运气。非常感谢任何帮助!

解决方法

dotnet-core-uninstall 是一个 separate experimental tool,不是 .NET Core SDK 的一部分。您需要download from its Github repo并安装它。

该工具不是全局工具,因为它无法删除正在运行的运行时。正如 repo README 解释的那样:

由于 .NET Core 全局工具是依赖于运行时的应用程序,因此它们使用安装在机器上的 .NET Core 运行时版本。该工具的目的是卸载任意 .NET Core SDK 和运行时,因此可能会尝试卸载正在运行当前进程的版本。发生这种情况时,我们没有找到从错误中恢复和卸载其他 SDK 和运行时的方法。我们认为这尤其成问题,因为用户可能不清楚正在卸载的 SDK 中有哪些运行时或当前正在使用哪个运行时。

例如,您可能已经安装了 NET 6 预览版并希望将其删除。如果 dotnet-core-uninstall 是一个全局工具,它将使用 .NET 6 Preview 运行时并且无法删除它

我们今天的关于MacOS使用pip安装pandas提示Cannot uninstall ''numpy''解决方案pip安装pandas报错的分享已经告一段落,感谢您的关注,如果您想了解更多关于Anaconda 3 下载错误,只下载 3 个地图 - 只有 conda-meta、Lib、pkgs、_conda.exe 和 Uninstall-Anaconda3.exe、apt uninstall 相关、Completely Uninstall Node.js from Mac OS X、dotnet-core-uninstall 无法从命令行运行的相关信息,请在本站查询。

本文标签: