简体   繁体   中英

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.

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.

点子

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM