2

I want to set some variables in my system.

Using echo $http_proxy also gives me the correct result, but when trying to access internet through terminal, I am getting the previous proxy and not the one I set.

I checked /etc/environment and found that it still shows the old proxy. How can I change this environment variable?

Manually set these in the terminal

export http_proxy="http://11.3.2.212:8080"
export https_proxy="https://11.3.2.212:8080"
export ftp_proxy="ftp://11.3.2.212:8080"

Accessing internet from terminal:

pip install tensorflow

Error:

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by
'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff579aaa668>,
'Connection to 16.34.2.212 timed out. (connect timeout=15)')'

16.34.2.212 is the old proxy.

I get the same error if I use:

export https_proxy="https://11.3.2.212:8080"; pip install tensorflow

or

export http_proxy="http://11.3.2.212:8080"; pip install tensorflow

OS: CentOS 7

I am using ssh to login to this system. I asked other users of the server. They are able to use these exact same commands to install.

Additional info:

type -a pip 

gives

pip is /usr/bin/pip
  • 1
  • @Kusalananda I tried the top two answers. Still getting same error. – user110327 Sep 8 '17 at 11:14
  • @terdon I have already added the error message. I am not repeating same error message because they are all same. – user110327 Sep 8 '17 at 11:28
  • 1
    No, that's fine. What we needed to see is the commands, no need to repeat the error. But mentioning that both https_proxy and http_proxy fail with the same error is very relevant. – terdon Sep 8 '17 at 11:32
  • 1
    Setting it manually really should work (and does on my system). Could pip be some sort of alias? What is the output of type -a pip? – terdon Sep 8 '17 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.