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 <http://json.org> 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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,991评论 19 139
  • 金蛋一: 晚上打坐 金蛋二: 伟大的喜马拉雅 我实在后知后觉的几近愚钝。最近发现喜马拉雅是个好去处。不管是我想看的...
    奔跑的马齿苋阅读 90评论 0 0
  • 一.每时每刻都不要放松 今天第一次去老年大学学习,肖老师开车送我们去的,在我爸爸的车上总是放音乐,但是肖老师车上就...
    灵江雪阅读 270评论 0 0
  • 腾讯新闻爆出了黑龙江教师大罢工的消息,这个消息一点也不令人意外,我知道这样的事情早晚会发生,虽然不当教师好几年了。...
    杨子老师阅读 615评论 1 3
  • 清明假期的一大早,爬楼听了昨晚行动派琦琦和彭小六关于行动派个人品牌训练营的开营大课,琦琦很真诚的分享,很走心,以“...
    竹溪Sophie阅读 1,413评论 3 5