Python初学者尝试在windows 10笔记本电脑上安装matplotlib

2024-05-20 23:21:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试将matplotlib安装到我的windows 10笔记本电脑中,但它不起作用。 我遵循《Python速成课程》一书中的说明

我正在Windows10上运行Python 3.8.2

通过命令提示符发送命令时

> python -m pip install --user matplotlib

我收到以下信息

*Microsoft Windows [Version 10.0.17763.1098]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\SGHCH>python -m pip install --user matplotlib
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/matplotlib/
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none)
ERROR: No matching distribution found for matplotlib
C:\Users\SGHCH>*

我下载了

matplotlib-3.2.1-cp38-cp38-win32.whl

。 之后,我导航到存储此控制盘的文件夹并尝试安装它。以下是我收到的回信

*Microsoft Windows [Version 10.0.17763.1098]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\SGHCH>cd desktop
C:\Users\SGHCH\Desktop>cd python_book
C:\Users\SGHCH\Desktop\python_book>python -m pip install --user matplotlib-3.2.1-cp38-cp38-win32.whl
Processing c:\users\sghch\desktop\python_book\matplotlib-3.2.1-cp38-cp38-win32.whl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/pyparsing/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/pyparsing/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/pyparsing/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/pyparsing/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authorization Required'))': /simple/pyparsing/
ERROR: Could not find a version that satisfies the requirement pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib==3.2.1) (from versions: none)
ERROR: No matching distribution found for pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib==3.2.1)
C:\Users\SGHCH\Desktop\python_book>*

我也在公司的笔记本电脑上运行所有这些。我不确定我是否有管理员权限

安装此控制盘是否需要管理员权限? 如果没有,你对如何解决这个问题有什么建议吗

问候,, 陈德良


Tags: nonereadbymatplotlibstatusconnectconnectionredirect