Python 2.7.2 - Cannot import name _random or random from sys -
im few months new python , pulling hair out on trying generate random integer. ive been scouring internet, tried many solutions provided on here nothing takes. python doesnt seem know has random module, though can see right there in lib. ive tried:
- copied relative .py doc , did import random without sys , same error.
- in interactive found "_random", import _random doesn't give me line 1 error, says random not defined though ive copied , pasted numerous random number code examples straight python , many site stated worked them.
about throw in towel
tried post pic apparently not "reputable" enough. exact error is:
macintosh:week 03a ersander$ python secretdoor.py traceback (most recent call last): file "secretdoor.py", line 1, in <module> sys import _random importerror: cannot import name _random
import random
random
isn't in sys
. don't know why you're trying import there.
Comments
Post a Comment