pythonlinuxpython-2.7redhatujson

python No module named ujson, while it's already installed


I've installed ujson using command pip install ujson and when I've tried to run my python project it returns ImportError: No module named ujson

Any help please?


Solution

  • The problem was that the PYTHONPATH variable is empty, and when I added the path to the variable it works.

    export PYTHONPATH=$PYTHONPATH:/usr/lib64/python2.7/site-packages