I'm making a code in Matlab that it makes iterations of a complex python code. To do so, it is necessary to change the anaconda environment in matlab code.
If I do it manually in CMD it works fine. The CMD steps that I make are the following:
- Activate environment--> C:\Anaconda3\Scripts\activate.bat
- Change directory--> cd C:\Anaconda3\master_RH %(directory where all the python files are placed)
- Execute code-->python C:\Anaconda3\master_RH\MAIN.py * C:\Anaconda3\*
With Matlab system command I'm able to do steps 2 and 3, but it seems that step 1 is not done correctly because the program does not run well because the environment hasn't been updated properly.
If someone could help me I would be totally grateful.