docker build TensorFlow的parameter server时,出现错误Collecting tornado>=4.0 ImportError: Tornado requires an up-to-date SSL module,原因应是Python2的版本过低,所以升级Python2到2.7.13。
参见https://blog.csdn.net/furzoom/article/details/53898861
1、安装
# wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz
# xz -d Python-2.7.13.tar.xz
# tar xf Python-2.7.13.tar
# cd Python-2.7.13
# ./configure --prefix=/usr/local/python27
# make
# make install
ps,网络不好时使用断点续传:# wget -c https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz
2、把原来的python删除,建立新的python的软链接
# rm /usr/bin/python
# ln -s /usr/local/python27/bin/python /usr/bin/python
# python -V
Python 2.7.13
3、注意yum的python版本,确保yum仍然可用:
# vim /usr/bin/yum
修改#!/usr/bin/python2
我在安装前是/usr/bin/python指向的是/usr/bin/python2.7,因此改为
#!/usr/bin/python2.7
Done!