Annaconda packages not loadable in Matlab
Show older comments
Dear learned friends,
I installed Annaconda 3 and set up a virtual environment with some customised packages (called "matlab"). I tried to load Python libraries such as numpy and matplotlib to use in Matlab. I know how to change the environment from "base" to "matlab" by using pyversion(...), but it is weird that no packages such as numpy or matplotlib can be loaded in the environment (though the other standard packages such as list and tuple do work). I then tried my "base" environment, but those packages did not work either. Any help would be greatly appreciated.
Best,
Peng
Accepted Answer
More Answers (1)
Yongjian Feng
on 18 Jul 2021
0 votes
Did you try to set the env var PYTHONPATH?
3 Comments
Peng Zhou
on 20 Jul 2021
Yongjian Feng
on 20 Jul 2021
It is just an environment variable. It needs to point to the location of your installed packages like numpy.
Follow this:
But in general, virtualenv could be tricky.
Peng Zhou
on 20 Jul 2021
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!