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

조회 수: 69 (최근 30일)
Jaime Trivino
Jaime Trivino 2021년 9월 10일
댓글: Jaime Trivino 2021년 9월 15일
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

채택된 답변

Jaime Trivino
Jaime Trivino 2021년 9월 15일
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>

추가 답변 (1개)

Yongjian Feng
Yongjian Feng 2021년 9월 12일
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
Jaime Trivino
Jaime Trivino 2021년 9월 15일
Thank you Yongjian. There is an easy shortcut when using conda

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by