I have an .x3d code which references a python script. I am trying to implement certain functions which make use of the numpy module. However, I am only able to import the builtin modules from Python.
I am looking for a way to import the numpy module into the script without having to call the interpreter (i.e. “test.py”, instead of “python test.py”).
Currently I get “ImportError: No module named numpy”.
My question is: Is there a way to import the numpy module without having to call from the interpreter? Is there a way to include numpy as one of the built-in modules of Python?
find where numpy is installed on your system. For me, it’s here:
/usr/lib/pymodules/python2.7
import it explicitly before importing numpy
import syssys.path.append('/usr/lib/pymodules/python2.7')… if you need help finding the correct path, check the contents of sys.path while using your python interpreter
import sysprint sys.path