首页 > 解决方案 > 使用 Python 3.6 安装 matplotlib 时出现问题

问题描述

由于无法在没有 Python 3.6 或更高版本的情况下安装 Matplotlib 的错误,我最近在我的 Windows 10 机器上安装了 Python 3.6。

但是,当我运行时python --version,它仍然会报告

Python 3.5.0

然而,我可以在 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.6 中看到 Python 3.6。

运行python -m pip install matplotlib仍然产生我:

ERROR: Complete output from command python setup.py egg_info:
ERROR:
Beginning with Matplotlib 3.1, Python 3.6 or above is required.

This may be due to an out of date pip.

Make sure you have pip >= 9.0.1.

----------------------------------------

我也试过python -m pip install --upgrade pip了,但它已经是最新的(19.1.1)

我尝试使用直接运行 Python 3.6,python-3.6 -m pip install matplotlib但得到:

'python-3.6' 不是内部或外部命令、可运行程序或批处理文件。

任何帮助表示赞赏。我需要使用 Python 3.6 安装 matplotlib,并且希望 3.6 作为我默认的 Python 实例。

标签: pythonpython-3.xmatplotlibpip

解决方案


推荐阅读