I want to run python code using tensorflow via matlab.
The python code was coded using pycharm, and it works very well when run in pycharm.
And I am trying to run this code using matlab's "pyrunfile" function.
However, the following error message is displayed in MATLAB, which cannot be resolved.
Python error : ModuleNotFoundError: No module named 'tensorflow'
I've installed tensorflow from pycharm and I'm not getting this error on pycharm, so I'm not sure why I'm getting this error.
The MATLAB code is as simple as one line of code:
pyrunfile('My_python_code.py');
And the error part of the python code I want to run is as follows.
(There is no problem at all in Python, but it means that the error only occurs when I run it in matlab.)
import tensorflow as tf
I am using python 3.7, tensorflow 2.3.0, and matlab 2021b.
Please help. Thank you.