38

http://pypi.python.org/pypi/simplejson

I am just diving into the Python world and want to make a simple twitter application which requires the installation of simplejson but not sure how I can set it up and get it working..

I am on a Windows System

S.Lott
  • 384,516
  • 81
  • 508
  • 779
TimLeung
  • 3,459
  • 6
  • 42
  • 59

5 Answers5

44

I would recommend EasyInstall, a package management application for Python.

Once you've installed EasyInstall, you should be able to go to a command window and type:

easy_install simplejson

This may require putting easy_install.exe on your PATH first, I don't remember if the EasyInstall setup does this for you (something like C:\Python25\Scripts).

Ryan Duffield
  • 18,497
  • 6
  • 40
  • 40
33

Really simple way is:

pip install simplejson
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
css-candies
  • 574
  • 6
  • 9
16

If you have Python 2.6 installed then you already have simplejson - just import json; it's the same thing.

Jacob Gabrielson
  • 34,800
  • 15
  • 46
  • 64
  • 1
    I followed the easy_install simplejson instructions but still had no luck. (Am also trying to install a python twitter client.) So I opened the .py file that was referencing simplejson, changed it to json, and then that worked. :-) – RogerV May 30 '11 at 06:09
7

You can import json as simplejson like this:

import json as simplejson

and keep backward compatibility.

hogasa
  • 71
  • 1
  • 2
  • 3
    Assuming the above comment is coming from the 'Late Answers' or 'First Posts' review queue, not realizing this is an answer, not a question... – femtoRgon Oct 12 '12 at 19:24
4

Download the source code, unzip it to and directory, and execute python setup.py install.

SearchDream
  • 101
  • 7
  • For Linux, download [simplejson-3.XX.X.tar.gz](https://pypi.org/project/simplejson/#files), `tar -xvzf simplejson-3.XX.X.tar.gz`. – xinthose Jul 15 '19 at 18:15