ModularM
Modular2y ago
4 replies
pascalpolygon

Numpy: Import from source dir error

I am trying to import Numpy in my mojo project using

from python import Python

fn main() raises:
    var np = Python.import_module("numpy")


But I get the following Error:
Unhandled exception caught during execution: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there.
mojo: error: execution exited with a non-zero result: 1
Was this page helpful?