Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7861457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:44:55+00:00 2026-06-02T22:44:55+00:00

Upgraded Ubuntu to Precise Pangolin (12.04), and Python’s Random is now broken… I suspect

  • 0

Upgraded Ubuntu to Precise Pangolin (12.04), and Python’s Random is now broken… I suspect other things might be broken too. How do I fix Python?

    File "/usr/lib/python2.7/random.py", line 47, in <module>
    from os import urandom as _urandom
ImportError: cannot import name urandom

Alas, poor Python! I knew him, Random, a module of infinite
jest, of most probable chaos. He hath bore me on his randint() a
thousand times, and now how abhorr’d in my workspace it is!
My Exception Handler rises at it.

edit Running in virtualenv

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:44:56+00:00Added an answer on June 2, 2026 at 10:44 pm

    Is this your problem?

    https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/989856

    Seems to be caused by running it in a virtual environment, and there is a work around.

    BTW this was the top result in google.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After I upgraded Ubuntu my Python was changed to 2.6.6 and my app.py stopped
I recently upgraded to Ubuntu 10.04 LTS and refreshed my Python environment. I installed
I upgraded my PC to Ubuntu 12.04 and restored the backup of my workspace
Upgraded to Rails 2.3.2 and Passenger 2.2.4 on Ubuntu hardy slice at slicehost with
I just upgrade to Ubuntu Karmic 9.10 and there is now emphaty. The problem
I upgraded a MVC1 project to MVC2, now all my calls to RenderPartial are
I recently upgraded to Ubuntu 10.04 which comes with Emacs 23. I need Jabref
Since I've upgraded to Ubuntu lucid and emacs23, Emacs pops up the debugger in
Ever since I upgraded my Ubuntu from 9.10 to 10.04 I can't start Netbeans
I have recently upgraded to Ubuntu 10.04 and as usual installed xdebug from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.