I\'m having problems with Python\'s import random function. It seems that import random and from random import random are importing different thing
import random
from random import random
You have to import the random function, from the random module before you can use it use it
In [1]: from random import random In [2]: random() Out[2]: 0.5607917948041573