Python Scripts on Mac

tbutler

New Member
I'm trying to use a Python OBS Script (one I downloaded on this forum, obsMidiClient). When I add it via the scripts dialogue, it appears, but the script's options do not appear in the options side of things. I've looked in the log and it shows nothing. I tried leaving the Python path blank, I tried installing 3.7.x and 3.6.0 using pyenv via Homebrew and providing those paths to OBS as well. Nothing seems to work. (It doesn't work with the OBS included "url-text.py" script, either.) Python isn't a language I've spent a ton of time in, but as far as I can tell all of the syntax checks out. Can anyone help me figure out what I am missing or how to get debug information, at least?

I'm running macOS 10.5.4 (Catalina).
 

tbutler

New Member
Do you know if there's a way to bind LUA to a Python framework? I'm trying to use that aforementioned MIDI plugin, which depends on the RtMidi library for Python. I'm guessing Lua probably doesn't have an equivalent, although I'll look into it.
 

4ktarus

New Member
Same issue here. If I look at the Obs Log, I can see that OBS can't find "libpython3.7m.dylib" . But I never found this file.
I know that on mac there is a python 2.7 version pre-install with OSX, but I install Python 3.8, and try with 3.6 and 3.7 nothing work.
Everything is properly install cause I succesfull run my script, without OBS, directly in python3 with the terminal (or with the python launcher). so there is no problem with the script or with the python installation. (as you say "(It doesn't work with the OBS included "url-text.py" script, either.)". have you find an solution ? Thx for your time !!!
 
Last edited:

4ktarus

New Member
To be perfectly clear :
Python works in OBS on mac with my config (see bellow) for lot's of script ( you may have to install library for python 3.7 before) with this config :
Python 2.7 AND Python 3.7
In Python setting in Obs (Tool/Script/python setting) you have to show this folder :
/Library/Frameworks/Python.framework/Versions/3.7
Keep us informed of your midi test !!
 

pani3610

New Member
To be perfectly clear :
Python works in OBS on mac with my config (see bellow) for lot's of script ( you may have to install library for python 3.7 before) with this config :
Python 2.7 AND Python 3.7
In Python setting in Obs (Tool/Script/python setting) you have to show this folder :
/Library/Frameworks/Python.framework/Versions/3.7
Keep us informed of your midi test !!
I tried to run Python script print('hello world') on my Mac but the Script log is blank.
In Python setting in Obs (Tool/Script/python setting) you have to show this folder :
/Library/Frameworks/Python.framework/Versions/3.6

@4ktarus can you help me with any additional settings required?

MbA : M1
Monterey 12.3
OBS 27.2.2
 

Matt Reiner

New Member
With OBS 28+, it seems you can use Python 3, up to 3.10.
Set the path to /Library/Frameworks (I guess you no longer have to select the version folder)
 

NeoDino

New Member
Just tested 3.11 its working great on 29.1.0

1683158354572.png
 
To be perfectly clear :
Python works in OBS on mac with my config (see bellow) for lot's of script ( you may have to install library for python 3.7 before) with this config :
Python 2.7 AND Python 3.7
In Python setting in Obs (Tool/Script/python setting) you have to show this folder :
/Library/Frameworks/Python.framework/Versions/3.7
Keep us informed of your midi test !!
I have now loaded Python 3.12 on an intel Mac OS Ventura. Thank You so much! Took me a lot of time with many steps, but this seems to be the final one. Now, I need to learn how to load a python script. I wouldn't think it would be hard now. Thanks again!!!!!
 
I have now loaded Python 3.12 on an intel Mac OS Ventura. Thank You so much! Took me a lot of time with many steps, but this seems to be the final one. Now, I need to learn how to load a python script. I wouldn't think it would be hard now. Thanks again!!!!!
One more question, please? It seems I can install some python scripts, but not others. Does each script have different dependencies or perhaps the one I am trying to load is not compatible with Macs? I do go to the eternal download site and try the installs, but something tells me it's for pc's.....url - text.py works, but zoom and follow mouse. py does not. It has "no properties available" error. The .lua script work, but it can only work on MacOS screen capture Thanks
 
Last edited:
Top