For this setup, I am using Windows 10
, MATLAB R2020b
and Pycharm
.
- Create new Condo environment in Pycharm (add Intepreter)

- Sanity check that the
python.exe
exist within the newly create env

- Add the
C:\Users\author\Anaconda3\envs\integrate_matlabs
in path. On the Windows Search Bar
, type Edit the system environment variables
Click the (1)Environment Variables..
, (2) Path
which is located under the section System variables
, (3) Browse..
and browse to the C:\Users\author\Anaconda3\envs\integrate_matlabs
.Finally click (4) OK
.

- Start MATLAB and type matlabroot in the command window. Copy the path returned by matlabroot.
'C:\Program Files\MATLAB\R2020b'

- On search Bar, type
Command prompt
, right click, and select run as administrator

- On the command prompt, type
6a) cd C:\Program Files\MATLAB\R2020b\extern\engines\python
6c C:\Program Files\MATLAB\R2020b\extern\engines\python>python setup.py install
A long list of log will be displayed. Wait until the line
C:\Program Files\MATLAB\R2020b\extern\engines\python>
which indicate the installation is complete.
Restart the MATLAB,
Type pyversion()
on the Matlab command window which will displayed
