2

I am not able to download any python packages via VS Code on my office Windows system due to the proxy. Is there a way that I can do it manually by downloading and placing the downloaded files at the right place?

e.g. acutally i can see the matplotlib package in https://pypi.org/simple/matplotlib/, but cannot download it from office as blocked by firewall.

So, though I set up proxy in vs code terminal as:

> (env) C:\Playground\vscode\py\ms>set
> HTTPS_PROXY=https://username:password@proxy.mycompany.com:8080
> 
> (env) C:\Playground\vscode\py\ms>set
> HTTP_PROXY=http://username:password@proxy.mycompany.com:8080

, no wonder it failed when I tried to install matplotlib:

> (env) C:\Playground\vscode\py\ms>easy_install matplotlib Searching for
> matplotlib Reading https://pypi.python.org/simple/matplotlib/
> Downloading
> https://files.pythonhosted.org/packages/51/fe/84ab101f8ab543d89b6a128326f62adcdafd2781ab8362a737e6ce78eea7/matplotlib-3.1.0.tar.gz#sha256=1e0213f87cc0076f7b0c4c251d7e23601e2419cd98691df79edb95517ba06f0c
> error: Can't download
> https://files.pythonhosted.org/packages/51/fe/84ab101f8ab543d89b6a128326f62adcdafd2781ab8362a737e6ce78eea7/matplotlib-3.1.0.tar.gz#sha256=1e0213f87cc0076f7b0c4c251d7e23601e2419cd98691df79edb95517ba06f0c:
> 403 Forbidden
Brett Cannon
  • 14,438
  • 3
  • 45
  • 40
athos
  • 6,120
  • 5
  • 51
  • 95

1 Answers1

1

If you have downloaded the appropriate wheel file you can point pip at that file and it will install it, e.g. python -m pip install path/to/package.whl.

Brett Cannon
  • 14,438
  • 3
  • 45
  • 40