Importing random module in Python Script

In IronPython Console “import random” works. But I couldn’t manage to import it in Python Script.

Is there a way to do it? Thanks in advance…
random randomError

import sys
sys.path.append(“C:\Program Files (x86)\IronPython 2.7\Lib”)
import random

 

does the trick!

1 Like

you have to add the path to your random.py library.

something like:

sys.path.append("/where_python _resides/lib")