Python No Module Named Ujson, While It's Already Installed

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

  • OS version: Red Hat Enterprise Linux Server release 7.2 (Maipo)
  • Python version: Python 2.7.6
  • pip list: ujson (1.35)

Any help please?

4

1 Answer

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.