How to add the path to a Conda (Python) Environment?

69 visualizaciones (últimos 30 días)
Jaime Trivino
Jaime Trivino el 10 de Sept. de 2021
Comentada: Jaime Trivino el 15 de Sept. de 2021
Hi,
I want a MATLAB function to execute a python funtion on a file on my computer, but when I run pyenv it does not show the Conda environment. Is it possible to configure MATLAB to use a local conda environment? If so how should I do it?
Thanks

Respuesta aceptada

Jaime Trivino
Jaime Trivino el 15 de Sept. de 2021
I have found that this can be done outside matlab with conda.
  1. Activate conda environment: <conda actuvate myEnv>
  2. Add path to local files: <conda develop /path to my python files>

Más respuestas (1)

Yongjian Feng
Yongjian Feng el 12 de Sept. de 2021
This is most likely the same as:
https://www.mathworks.com/matlabcentral/answers/1450479-how-to-add-the-path-to-a-local-python-file-to-be-executed-by-a-matlab-script
In general, using virtual env is challenging.
  1 comentario
Jaime Trivino
Jaime Trivino el 15 de Sept. de 2021
Thank you Yongjian. There is an easy shortcut when using conda

Iniciar sesión para comentar.

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by