0

I have 2019a version of MATLAB and I am trying to explore the usage of Python from within MATLAB environment. I have Anaconda 3 installed for Python. In MATLAB, when I issue, pyenv, I get 'Undefined function or variable 'pyenv''

The documentation says that Python is supported, but I am not sure why this doesn't work. Any suggestions?

Edit: Thanks. Solution is to use pyversion, but also set the path with the entire path pyversion 'C:\Users\newuser\AppData\Local\Continuum\anaconda3\python.exe';

2 Answers 2

4

pyenv was introduced in R2019b. In R2019a and older, you need to use the older pyversion function.

Sign up to request clarification or add additional context in comments.

Comments

0

Also, a nifty trick to make this process simpler is to activate the conda environment in your cmd prompt, and type matlab. And the started MATLAB session is automatically with this environment utilized. I saw this trick in Set up a MATLAB+Python environment, and this worked for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.