网站https://rda.ucar.edu/datasets/ds083.2/index.html#!access下载fnl数据之python脚本遇到的bug
File "/usr/lib/python2.6/site-packages/requests/structures.py", line 54, in __getitem__
return self._store[key.lower()][1]
KeyError: 'content-length'
该bug经查询是缺少requests包,安装完成requests包报错提示缺少urllib,但是这些安装都用pip,安装pip又需要setuptools,于是乎从安装setuptools开始,以下安装按照次序进行
# tar zxvf setuptools-2.0.tar.gz
# cd setuptools-2.0
# python setup.py build
# python setup.py install
下载地址:https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
# tar -xzvf pip-1.5.4.tar.gz
# cd pip-1.5.4
# python setup.py install
pip install urllib3
下载requests,将该包放在安装python目录下的bin的目录下
如果是非root账户,想用新版本的python,则在命令行下定位到python安装目录的bin/python -u 加python脚本