python - 如果没有 python 3.5 或更高版本和 pip 18 及更高版本,MatPlotLib 将无法安装,而且我没有 root 访问权限
问题描述
我已获得对服务器的远程访问权限。而且我需要使用诸如pyswarms之类的模块。但是 pyswarms 尝试安装 Matplotlib 和 Matplotlib 3 需要 python 3.5 或更高版本和/或 pip 9 或更高版本。在该服务器上有 python 3.4 和 pip 8。我一直在使用 --user 安装模块。我没有root访问权限,所以我不能使用sudo。我尝试更新 pip 但它再次安装了相同的版本(8)。有什么办法吗?
收集 matplotlib>=1.3.1(来自 pyswarms)使用缓存的https://files.pythonhosted.org/packages/89/0c /653aec68e9cfb775c4fbae8f71011206e5e7fe4d60fcf01ea1a9d3bc957f/matplotlib-3.0.2.tar.gz 命令 python setup.py egg_info 的完整输出:
Matplotlib 3.0+ does not support Python 2.x, 3.0, 3.1, 3.2, 3.3, or 3.4.
Beginning with Matplotlib 3.0, Python 3.5 and above is required.
This may be due to an out of date pip.
Make sure you have pip >= 9.0.1.
解决方案
安装有约束的包:
pip install pyswarms 'matplotlib<3.0'
即安装pyswarms(任意版本),安装低于3.0版本的matplotlib。
推荐阅读
- qt - 我如何从 Maya 复制这个 2D 相机变焦?
- electron - Windows 启动时电子应用程序未启动
- c++ - ESP32 一段时间后停止通过 wifi 发送数据
- python - QGIS python导出组的所有层
- scikit-learn - 使用带和不带管道的逻辑回归的不同 AUC-PR 分数
- android - android set config 以编程方式将标志值更改为 uiMode
- java - 如何使用 java EventBridgeClient 调用 aws lambda
- mysql - 为什么 Spring Batch 在我的 Ubuntu 20.04 机器上的 MySql 上创建小写表?
- c# - ClipCursor 不适用于基于触摸的体验
- meta - 如何生成产品默认字段值