How to install matplotlib | Windows 10 | Python 3.8.2

Hello,
I am a beginner with Python and I am learning Python from the book “Python Crash Course”.
I am using a windows 10 laptop and running Python 3.8.2.

when I run >python -m pip install --user matplotlib, the following

Microsoft Windows [Version 10.0.17763.1098]
© 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>

When that failed, the book “Python Crash Course” recommended to download the wheel for matplotlib, store it in a folder and use command prompt to navigate to folder and install. Please refer below.

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/python-dateutil/
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/python-dateutil/
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/python-dateutil/
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/python-dateutil/
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/python-dateutil/
ERROR: Could not find a version that satisfies the requirement python-dateutil>=2.1 (from matplotlib==3.2.1) (from versions: none)
ERROR: No matching distribution found for python-dateutil>=2.1 (from matplotlib==3.2.1)

C:\Users\SGHCH\Desktop\python_book>

Any suggestions on how to solve this problem?

Regards,
Adrian

Once you have the Matplotlib wheel, pip is still trying to reach out to the internet to get the wheels for our dependencies.

https://stackoverflow.com/questions/9698557/how-to-use-pip-on-windows-behind-an-authenticating-proxy maybe helpful, however if you are behind an authenticated proxy I suspect that you are on a corporate network. I suggest re-directing this question to your local helpdesk to sort out how to configure this and still be complaint with your local policies.

The other option is to download the wheels for each of our dependencies (and their dependencies …) by hand.

Hello,
Thanks for the suggestions.
I was indeed doing this in my corporate network.
When I did it on another PC outside my corporate network, it worked.
Thanks!