How can I use MATLAB with Curated Python Distributions?
Many distributions of Python work with MATLAB out of the box. Download and install the distribution then use the "pyenv" command to tell MATLAB how to find your version of Python.
However, some curated or value-added versions of Python may require additional setup. For example, Miniconda/Anaconda(1) configures the Python environmental path in a way that is different from other Python distributions. This can cause issues when running Miniconda/Anaconda Python modules from MATLAB.
One way to avoid these issues is to launch MATLAB from the activated Miniconda/Anaconda terminal. When you launch MATLAB from the Miniconda/Anaconda terminal, MATLAB is configured with the current Python (base or virtual) environment path information.
However, launching MATLAB from the Miniconda/Anaconda terminal may not always be a convenient option. This article describes another method to allow users to run Python functions from MATLAB using Miniconda/Anaconda.
(1) Note: Anaconda, Conda, and Miniconda are registered trademarks owned by Anaconda, Inc. Anaconda may require a paid license. Consult Anaconda’s Terms of Service to ensure your usage is compliant.
Accepted Answer
0 Comments
More Answers (0)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!