0
votes

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.

1
Are you missing https:// before server? - Hassan Voyeau
I did use https:// in the first try but same error. - Jhangir Awan
But did you use it without the brackets? - Hassan Voyeau
Yes sir but it is still giving me the below error: Could not install packages due to an EnvironmentError: Failed to parse: proxyserver:port - Jhangir Awan
Any special characters? Those would need to be encoded. - Hassan Voyeau

1 Answers

2
votes

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