Thank you! i was fiddling with variations of using setup.py : ) but yours does seem to install livekit.
(env) [opalstack_username@opal4 src]$ source scl_source enable devtoolset-11
(env) [opalstack_username@opal4 ~]$ cd opt/src
(env) [opalstack_username@opal4 src]$ git clone https://github.com/livekit/python-sdks.git
Cloning into 'python-sdks'...
remote: Enumerating objects: 2134, done.
remote: Counting objects: 100% (1226/1226), done.
remote: Compressing objects: 100% (550/550), done.
remote: Total 2134 (delta 891), reused 794 (delta 622), pack-reused 908
Receiving objects: 100% (2134/2134), 1.63 MiB | 0 bytes/s, done.
Resolving deltas: 100% (1226/1226), done.
(env) [opalstack_username@opal4 src]$ cd python-sdks/livekit-rtc
(env) [opalstack_username@opal4 livekit-rtc]$ sed -iE 's/from wheel.bdist_wheel import get_platform/from wheel._bdist_wheel import get_platform/' setup.py
(env) [opalstack_username@opal4 livekit-rtc]$ pip install .
Processing /home/opalstack_username/opt/src/python-sdks/livekit-rtc
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: protobuf>=3 in /home/opalstack_username/apps/appname/env/lib/python3.12/site-packages (from livekit==0.12.1) (5.27.3)
Requirement already satisfied: types-protobuf>=3 in /home/opalstack_username/apps/appname/env/lib/python3.12/site-packages (from livekit==0.12.1) (4.25.0.20240417)
Building wheels for collected packages: livekit
Building wheel for livekit (pyproject.toml) ... done
Created wheel for livekit: filename=livekit-0.12.1-py3-none-linux_x86_64.whl size=86478 sha256=3a2e2a7fefee9b0dc18860ea2e0f968b29fcfe01a7ddcdb237c325cb4b50260d
Stored in directory: /home/opalstack_username/.cache/pip/wheels/f8/cb/f0/bb41e36997437ea12ee9208bde1f00b3ec05062d096b32e4aa
Successfully built livekit
Installing collected packages: livekit
Successfully installed livekit-0.12.1
It does seem to be installed. eg this works
import livekit (good it works)
but locally i can the following but it is not working in this remote env we just set up.
from livekit import rtc (it doesn't work)
from livekit.rtc import Room (it doesn't work)
Not sure what to make of this. Any ideas?
(env) [opalstack_username@opal4 python-sdks]$ python
Python 3.12.4 (main, Jun 9 2024, 20:53:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import livekit
>>> from livekit import rtc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/opalstack_username/apps/appname/env/lib/python3.12/site-packages/livekit/rtc/__init__.py", line 30, in <module>
from .audio_frame import AudioFrame
File "/home/opalstack_username/apps/appname/env/lib/python3.12/site-packages/livekit/rtc/audio_frame.py", line 16, in <module>
from ._ffi_client import FfiHandle, FfiClient
File "/home/opalstack_username/apps/appname/env/lib/python3.12/site-packages/livekit/rtc/_ffi_client.py", line 60, in <module>
ffi_lib = get_ffi_lib()
^^^^^^^^^^^^^
File "/home/opalstack_username/apps/appname/env/lib/python3.12/site-packages/livekit/rtc/_ffi_client.py", line 57, in get_ffi_lib
return ctypes.CDLL(str(path))
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/ctypes/__init__.py", line 379, in __init__
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /home/opalstack_username/apps/appname/env/lib/python3.12/site-packages/livekit/rtc/resources/liblivekit_ffi.so: cannot open shared object file: No such file or directory