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=""
export https_proxy=""
export ftp_proxy=""

Accessing internet from terminal:

pip install tensorflow


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 timed out. (connect timeout=15)')' is the old proxy.

I get the same error if I use:

export https_proxy=""; pip install tensorflow


export http_proxy=""; 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 


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.