Shell object with python script arguments in Conda environment


    Feb 28 2019 | 2:45 am
    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?

    • Feb 28 2019 | 8:44 am
      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.