I found this same error after upgrading to precise pangolin and activating my virtualenv. I was able to work around it by creating a fresh virtualenv which worked as expected, I just had to reinstall all python libs into the new virtualenv.
Error messages I saw: When trying to run nosetests: File "/usr/lib/python2.7/multiprocessing/process.py", line 309, in __init__ self._authkey = AuthenticationString(os.urandom(32)) AttributeError: 'module' object has no attribute 'urandom' When trying to run pip: File "/usr/lib/python2.7/random.py", line 47, in <module> from os import urandom as _urandom ImportError: cannot import name urandom -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/989856 Title: import random fails because _urandom is unavailable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/989856/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs