0

I have a python file that starts with:

import random
from numpy.random import choice
from decimal import *

When I run in IDLE, I don't get any import-related errors, but when I try to run the same file in SublimeREPL, it returns:

ImportError: No module named numpy.random

I am new to using SublimeREPL and I have no idea why this is happening. If you need any information I haven't provided, just comment.

Bretsky
  • 423
  • 8
  • 23
  • Is `numpy` installed for the interpreter Sublime is using? – jonrsharpe Mar 21 '15 at 09:07
  • How do I find out which interpreter is being used? I have two python installations, 2.7, and 3.4.2. I have numpy installed for 3.4.2. – Bretsky Mar 21 '15 at 09:12
  • Well does `print 'foo'` work in the REPL? If so, it's using 2.x. Look into e.g. http://stackoverflow.com/q/20861176/3001761 for specifying a particular interpreter. – jonrsharpe Mar 21 '15 at 09:13
  • It is 2.x. How do I change it to the correct installation? – Bretsky Mar 21 '15 at 16:24
  • Well did you read the question I've already linked to about specifying a particular interpreter? Or read SublimeREPL's documentation? – jonrsharpe Mar 21 '15 at 16:25

0 Answers0