Jhangir Awan
Jhangir Awan

Reputation: 17

Using pip install at work behind proxy - EnvironmentError

I am trying to install some packages at work using pip install, there is a proxy so I cannot do it the conventional way or I get an error.

I am trying to use

pip install --proxy=https://[username:password@]proxyserver:port upgrade pip wheel setuptools

However the above gives me an error of "Could not install packages due to an EnvironmentError: Failed to parse: ]proxyserver:port"

I also tried to use

pip install --proxy="user:password@server:port" upgrade pip wheel setuptools

But it gives me an error of below

Could not install packages due to an EnvironmentError: Failed to parse: server:port

Both times it does start the process, it says Collecting upgrade but then fails.

Upvotes: 0

Views: 7172

Answers (1)

Hassan Voyeau
Hassan Voyeau

Reputation: 3624

I setup a proxy server on my machine so I could test this out

If my password contains a special character like # or @ then it complains with the error that you are seeing (see my screenshot). If I encode the special character # > %23 then I get no error.

pip

Upvotes: 2

Related Questions