0
$\begingroup$

I looked around on Google, and found that python has support for this through the scipy module. According to this StackExchange page, all you need to do is:

import scipy.io
mat = scipy.io.loadmat('file.mat')

When I try this in the python interface in blender though, I get the following error:

ModuleNotFoundError: No module named 'scipy'

Is there a way to get this module to work, or any other way to import a .mat file into bpy?

Thanks for the help!

$\endgroup$
12
  • 3
    $\begingroup$ You need to install scypi in Blender, or make Blender use the system Python. See blender.stackexchange.com/questions/161894/… or blender.stackexchange.com/questions/106099/… $\endgroup$
    – Ron Jensen
    Commented Jun 3, 2021 at 21:46
  • 1
    $\begingroup$ Did you install it inside Blender using the Blender console? $\endgroup$
    – Ron Jensen
    Commented Jun 3, 2021 at 23:20
  • 1
    $\begingroup$ Windows isn't letting you install because the folder is protected. Just for this step you can try running Blender as administrator. $\endgroup$
    – Ron Jensen
    Commented Jun 5, 2021 at 2:49
  • 1
    $\begingroup$ did you try ["install", "scipy", "--user"] which would emulate the required pip cli command. (or navigate to folder and run pip from cli as admin) There are a number of posts on installing 3rd party modules. My 2c worth is look at making a virtual env running same python version as blender, and point blenders python to it. $\endgroup$
    – batFINGER
    Commented Jun 6, 2021 at 15:25
  • 1
    $\begingroup$ pip.main([...]) Suggest googling python error messages if unsure of their meaning. $\endgroup$
    – batFINGER
    Commented Jun 7, 2021 at 15:12

0

You must log in to answer this question.

Browse other questions tagged .