Virtual environments equivalent in Matlab

조회 수: 15 (최근 30일)
Paulo
Paulo 2024년 12월 6일
댓글: Paulo 2024년 12월 9일
Hi everyone,
Is there any equivalent of Python's virtual environment in Matlab?
Here is my usecase: we are continuasly developing a toolbox for our projects, once a project is finished I'd like to be able to archive it with information of the specific version of the toolbox that was used for that analysis, so that if we ever need to rerun such analysis it is possible with one command to reset the environment of all the packages to the appropriate version (preferebly in an isolated way so that only the instance of Matlab that is running that project is affected). Very much how we can switch environments for different projects when working with Python.
Thank you
  댓글 수: 1
Rik
Rik 2024년 12월 7일
I'm not aware of this being possible in Matlab.
However, most versioning is taken care of with the main Matlab version. All other code files can be copied. That is my strategy, so I haven't needed this option (although I do agree it has merit).

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

채택된 답변

Anjaneyulu Bairi
Anjaneyulu Bairi 2024년 12월 7일
편집: Anjaneyulu Bairi 2024년 12월 7일
Hi,
MATLAB does not have a direct equivalent to Python's virtual environments,but you can use "projects" feature in the MATLAB.
It can help manage paths, dependencies, and settings specific to a project. You can create a project for each of your analyses, Projects can help you organize your work and collaborate. Use projects to find files required to run your code, manage and share files and settings, and interact with source control.
You can add only the necessary directories to the path for that project. You can add automated run scripts when opening or closing the project to set up the environment.
To know more about it, visit the below documentation link:
  댓글 수: 1
Paulo
Paulo 2024년 12월 9일
Thanks, this seems like the closest we can get to a virtual environment. I'll definitely check it

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dependency Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by