I was working on an old Django project (Django version 1.3.2, Python version 2.6.6). Running "python manage.py runserver" gives me: "ImportError: cannot import name urandom".
Searching online returns a bunch of results about solving the problem by re-running virtualenv. This doesn't make sense because I never had virtualenv installed and things worked before...so I figured it must be a problem with my python installation.
I decided to remove and re-install Django by following the Django installation guide by running
pip install Django
Doing django-admin.py startproject project
gives me the same ImportError. So I uninstalled Django again using pip uninstall Django
.
Now running python
starts the python2.6.6 shell, typing from os import urandom
gives me the "ImportError: cannot import name urandom" message, while doing the same in python2.7
does not give such error.
What's going on here? What's breaking my python2.6.6?