python - 无法安装 matplotlib,因为“六”是 distutils
问题描述
我想matplotlib
在我的新 Mac 上安装,但由于six
是“distutils 安装项目”而无法安装,这是什么意思?我输入了以下内容:
sudo -H python -m pip install -U matplotlib
它首先抛出了“缓存这个;下载那个”的所有常用术语,然后,BOOM 就在那里;错误:
Cannot uninstall 'six'. 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.
解决方案
为了了解您在这里遇到的错误,您需要了解 distutils 是什么;简而言之,它们是分发和安装 Python 扩展和包的方法。您可以在此处了解有关它们的更多信息。six
是一种包装 Python 2 和 3 之间差异的方法。
话虽如此,您可以简单地添加--ignore-installed
到您的参数中,如下所示。
sudo -H python -m pip install -U matplotlib --ignore-installed
推荐阅读
- typo3 - TYPO3 纯后端扩展 V11.5
- unity3d - 在客户编辑器中序列化的正确方法?
- c# - 如何在nlog中将属性序列化为json
- delphi - 如何在过程中将类引用(元类)作为参数传递?
- python - Python xport 模块:struct.error:所需参数不是整数
- arduino - ESP8266 上的 WiFi 状态 1
- python - 使用 Django RF、Celery 和 RabbitMQ 获取 API
- jquery - 不要在父级上触发 mouseenter 事件
- parameters - 使用 R markdown 创建特定国家/地区的报告
- r - 在不使用 dplyr 包的情况下删除 R 中只有一个人的组