1

I have installed python on windows and i used to install packages by opening cmd and typing pip install package. Now when i try to install any package trough pip i get this error:

ERROR: Could not install packages due to an EnvironmentError: Please check proxy URL. It is malformed and could be missing the host.

I have tried to google for the error but the only possible solutions i have found are turning to 1 LongPathsEnabled in the regedit or starting the cmd as administrator, but both didnt work for me.

Edit: for some reason in "Internet Options > Connections > LAN Settings" the proxy setting was activated but without any actual proxy. After deactivating it i could use pip properly.

sizartm
  • 13
  • 3
  • 2
    Does this answer your question? [Error during pip install -Please check proxy URL](https://stackoverflow.com/questions/55613293/error-during-pip-install-please-check-proxy-url) – abhigyanj Oct 24 '20 at 08:12
  • did you check if your internet access or your proxy setting is correct? – Nwawel A Iroume Oct 24 '20 at 08:21

2 Answers2

0

To use pip behind a proxy, you can specify the proxy with the --proxy option.

pip install --proxy=https://user:pass@server:port packages

If you're going to do several pip installs in a given session, you can set your proxy variables in the terminal or command prompt. The lines below are taken from here. If you have the ability to define the environmental variables, do that once and you should be good to go.

# Windows
set http_proxy=http://[username:password@]proxyserver:port
set http_proxy=https://[username:password@]proxyserver:port

# Linux
export https_proxy=https://[username:password@]proxyserver:port

View full answer here: Error during pip install -Please check proxy URL

Also, have you added pip to your environment?

TechFence
  • 28
  • 2
-1

I think you are behind a proxy, so specify the Credentials, Server address and port:

pip install --proxy=https://user:pass@server:port
Wasif
  • 14,755
  • 3
  • 14
  • 34