Reputation: 469
I'm trying to run a command to install bespinclient on my Windows laptop but every time I execute the command python bootstrap.py --no-site-packages
, I get an error saying:
ImportError: No module named simplejson
I'm using Mozilla build tools to run these Linux commands.
Upvotes: 46
Views: 125132
Reputation: 687
Sometimes there is permission errors. Try:
sudo pip install simplejson
Hope it helps.
Upvotes: 5
Reputation: 667
For anyone coming across this years later:
TL;DR check your pip version (2 vs 3)
I had this same issue and it was not fixed by running pip install simplejson
despite pip insisting that it was installed. Then I realized that I had both python 2 and python 3 installed.
> python -V
Python 2.7.12
> pip -V
pip 9.0.1 from /usr/local/lib/python3.5/site-packages (python 3.5)
Installing with the correct version of pip is as easy as using pip2
:
> pip2 install simplejson
and then python 2 can import simplejson
fine.
Upvotes: 0
Reputation: 59
On Ubuntu/Debian, you can install it with apt-get install python-simplejson
Upvotes: 5
Reputation: 222812
That means you must install simplejson
. On newer versions of python, it was included by default into python's distribution, and renamed to json
. So if you are on python 2.6+ you should change all instances of simplejson
to json
.
For a quick fix you could also edit the file and change the line:
import simplejson
to:
import json as simplejson
and hopefully things will work.
Upvotes: 93
Reputation: 11167
@noskio is correct... it just means that simplejson
isn't found on your system and you need to install it for Python older than 2.6. one way is to use the setuptools easy_install
tool. with it, you can install it as easily as: easy_install simplejson
UPDATE (Feb 2014): this is probably old news to many of you, but pip is a more modern tool that works in a similar way (i.e., pip install simplejson
), only it can also uninstall apps.
Upvotes: 9