"Python not currently loaded" error

sokartakis

New Member
Hi all,
I am new in OBS but use extensively Python. I have a Mac (Apple M1, 13.3.1 MacOS) running OBS 29.0.2 and I am trying to load Python scripts. In the Python settings tab, I have tried all the different paths that I have installed Python 3.6, 3.9, 3.10, 3.11, for "Python Install Path (64bit)" including:
/Library/Frameworks/Python.framework
/Library/Frameworks/Python.framework/Versions/3.6
/usr/bin/python
/Users/<user>/opt/anaconda3

Have anyone made it work? I want to use the Python script for "zoom and track the mouse". Is there any other option based on LUA?
Thank you all in advance and I am looking forward to your reply.
 

NeoDino

New Member
I had same issue, so I did following to fix :

1. Downloaded latest release 29.1.0 (this one supports 3.11 python check release notes) obs-studio-29.1.0-macos-arm64.dmg
2. Make sure I have python 3.11 installed
Code:
brew info python
==> python@3.11: stable 3.11.3 (bottled)
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/opt/homebrew/Cellar/python@3.11/3.11.3 (3,183 files, 62.3MB) *
  Poured from bottle using the formulae.brew.sh API on 2023-04-25 at 13:28:56
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/python@3.11.rb
License: Python-2.0
==> Dependencies
Build: pkg-config ✔
Required: mpdecimal ✔, openssl@1.1 ✔, sqlite ✔, xz ✔
==> Caveats
Python has been installed as
  /opt/homebrew/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /opt/homebrew/opt/python@3.11/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /opt/homebrew/lib/python3.11/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.11

gdbm (`dbm.gnu`) is no longer included in this formula, but it is available separately:
  brew install python-gdbm@3.11
`dbm.ndbm` changed database backends in Homebrew Python 3.11.
If you need to read a database from a previous Homebrew Python created via `dbm.ndbm`,
you'll need to read your database using the older version of Homebrew Python and convert to another format.
`dbm` still defaults to `dbm.gnu` when it is installed.

For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python
==> Analytics
install: 4,246 (30 days), 448,627 (90 days), 1,683,010 (365 days)
install-on-request: 1,116 (30 days), 84,805 (90 days), 192,717 (365 days)
build-error: 7 (30 days)

OTHERWISE:

Code:
brew install python@3.11

3. Then set "Python Settings" like so (got it from https://obsproject.com/forum/threads/python-scripts-on-mac.121235/)
1683159162607.png
 

Attachments

  • 1683158929839.png
    1683158929839.png
    268.9 KB · Views: 427
  • 1683159053375.png
    1683159053375.png
    189.5 KB · Views: 428

sokartakis

New Member
Perfect! This resolved my issue of loading Python. Note for the new users: If you cannot see the opt folder press "Command+Shift+<dot>". This will show the hidden folders. Then, find the path as provided by Neodino! Thank you Neodino
 

ace_han

New Member
Hi, NeoDino
I have lots of python virtualenv and failed to set the Python Install Path to one of them. Can you help, too?
1691056155549.png
 

ace_han

New Member
I did a little bit digging. It seems that a Framework version python will do the trick on Mac. Especially when it comes to anything involving a GUI (say perhaps Matplotlib etc). Leaving a comment here for those who may come across the similar situation.

The script I used to build the Framework version python as below:
env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.11.4

1691116206058.png


A google article explain a little more as below: https://ryangadams.medium.com/python-framework-builds-pipenv-pyenv-and-virtualenv-adc103c3c0e9
 
Top