Shell object with python script arguments in Conda environment

sandcobainer~'s icon

Using Python with shell on Max 8 was a breeze till I started using arguments with my Python script. As the shell object does not display any errors while running, it's very frustrating how to figure out what's going wrong.

So here's my maxpatch, the maxpatch calls a python script and feeds in 4 arguments, 2 file paths and 2 ints. The python script runs perfectly when I run this on the terminal:

nohup python /Users/sandeepdasari/Desktop/encoding1to1.py -i /Users/sandeepdasari/Downloads/Dinky_Desired\ House/Single\ Hit/Orchestral/ -o /Users/sandeepdasari/Downloads/Dinky_Desired\ House/Single\ Hit/Orchestral/Gen/ -r 2000 -l 10000

I generate the exact same message in Max, but no response of execution is received from the Python script. any ideas how to resolve this? EDIT: After taking a close look, I am suspicious about the conda activate command I am using. Is it possible to run a conda environment with shell?

pythonshell.maxpat
Max Patch
Python script arguments through shell

sandcobainer~'s icon

I managed to get all the anaconda environment commands to work by putting them all in run.sh script and passing arguments to the run.sh script from Max.

Inside the shell script, you can later reorganise the commands as required.. This is much more efficient than using append and prepend in Max. Hope this helps anyone who wants to run Python virtual environments in Max.

Miillkk's icon

Thank you for this. I've been looking for this in Shell threads and seeing your name pop up. Super nice of you to leave a lead for other people to follow even though no one responded to you. Cheers!

edit: I feel like I'm getting warmer with this https://github.com/conda/conda/issues/7980