xxxxxxxxxx
pip install tensorflow --upgrade
# or
$ python -m pip install -U tensorflow
xxxxxxxxxx
######## for Python 2.7
pip install --upgrade pip
pip install --upgrade tensorflow
######## for Python 3.n
pip3 install --upgrade pip
pip3 install --upgrade tensorflow
xxxxxxxxxx
pip install --upgrade pip
pip install --upgrade tensorflow
# replace pip with pip3 in python3