python2.4.2环境安装simplejson

官网链接:https://pypi.python.org/pypi/simplejson/2.1.0


对于一些老版本的linux,比如SUSE10,默认的python版本是2.4.2。

通过ansible管理时会报错:

Error: ansible requires the stdlib json or simplejson module, neither was found.


解决方案:需要安装低版本simplejson 2.1.0。


simplejson is a simple, fast, complete, correct and extensible JSON encoder and decoder for Python 2.4+. It is pure Python code with no dependencies, but includes an optional C extension for a serious speed boost.

simplejson was formerly known as simple_json, but changed its name to comply with PEP 8 module naming guidelines.

The encoder may be subclassed to provide serialization in any kind of situation, without any special support by the objects to be serialized (somewhat like pickle).

The decoder can handle incoming JSON strings of any specified encoding (UTF-8 by default).


安装方法:

下载后解压,进入目录,执行python setup.py install

你可能感兴趣的:(python2.4.2环境安装simplejson)