livekit / python-sdks

LiveKit real-time and server SDKs for Python

Home Page:https://docs.livekit.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to install livekit on ARMv8 processor

dujeong opened this issue · comments

I failed to install livekit on ARMv8 processor. (model name : ARMv8 Processor rev 1 (v8l))
Livekit python SDK doesn't support ARMv8 processor?
I commanded pip install livekit, and below error logs were printed..

Collecting livekit
  Using cached livekit-0.4.6.tar.gz (32 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pyee>=11.0.0
  Using cached pyee-11.1.0-py3-none-any.whl (15 kB)
Requirement already satisfied: types-protobuf>=3.1.0 in ./.local/lib/python3.8/site-packages (from livekit) (4.24.0.20240106)
Requirement already satisfied: protobuf>=3.1.0 in ./.local/lib/python3.8/site-packages (from livekit) (4.23.4)
Collecting typing-extensions
  Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Building wheels for collected packages: livekit
  Building wheel for livekit (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmpcriyadnp build_wheel /tmp/tmpl3obxhe9
       cwd: /tmp/pip-install-bot7e4ne/livekit
  Complete output (49 lines):
  running bdist_wheel
  running build
  running build_py
  Traceback (most recent call last):
    File "/tmp/tmpcriyadnp", line 280, in <module>
      main()
    File "/tmp/tmpcriyadnp", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmpcriyadnp", line 204, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 404, in build_wheel
      return self._build_with_temp_dir(
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 389, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 64, in <module>
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 368, in run
      self.run_command("build")
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-x4gjdyn0/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "<string>", line 52, in run
    File "/usr/lib/python3.8/subprocess.py", line 516, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['python3', PosixPath('/tmp/pip-install-bot7e4ne/livekit/rust-sdks/download_ffi.py'), '--output', 'livekit/resources']' returned non-zero exit status 2.
  ----------------------------------------
  ERROR: Failed building wheel for livekit
Failed to build livekit
ERROR: Could not build wheels for livekit which use PEP 517 and cannot be installed directly

I found target_arch in rust-sdks/download_ffi.py (https://github.com/livekit/rust-sdks/blob/main/download_ffi.py)

def target_arch():
    arch = platform.machine().lower()
    arch_mapping = {
        "amd64": "x86_64",
        "x86_64": "x86_64",
        "arm64": "arm64",
        "aarch64": "arm64",
        "armv7": "armv7",
        "armv7l": "armv7",
    }

There is no armv8 here...

Hey, which OS are you using?

You're trying to use an older version: livekit-0.4.6
Can you try with the latest?

I'm using Ubuntu 20.04
I checked livekit version, and the latest version is 0.8.0 currently.
So I tried that version, but some error occured.

$ pip install livekit==0.8.0
ERROR: Could not find a version that satisfies the requirement livekit==0.8.0 (from versions: 0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.2, 0.2.3, 0.2.5, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.5, 0.4.6)
ERROR: No matching distribution found for livekit==0.8.0

Fianlly, I installed livekit latest version(0.8.0) manually..
Thank you a lot!

After manual installation, I encountered importing error like below.

>>> from livekit import api, rtc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'rtc' from 'livekit' (unknown location)

The version tested on my laptop was 0.7.1, so I changed the version. (0.8.8 -> 0.7.1)
Because version 0.7.1 worked well on my laptop.
Laptop OS is Linux Mint 21 which is based on Ubuntu 22.04

However, livekit is still not imported on the device(NVIDIA Orin jetpack5 based on Ubuntu 20.04).

Livekit-related library version information:

$ pip list|grep livekit
livekit                              0.7.1
livekit-api                          0.4.1
livekit-protocol                     0.3.1

Are there any specific livekit versions available for each OS version?

please install the latest version.. 0.8.0. we are unable to support older versions of the software.

okay. I tried again version 0.8.0. But again error..

>>> from livekit import api, rtc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'rtc' from 'livekit' (unknown location)

Livekit-related library version information:

$ pip list|grep live
livekit                              0.8.0
livekit-api                          0.4.1
livekit-protocol                     0.3.1

I think python version is the problem.
Python3 version is 3.8.10.
Python 3.8 is supported before version 0.4.6..

I made a python virtual environment and tested in it.
It worked well in Python3.9!
Also, the livekit version was well installed at 0.8.0.

Thanks for confirming. Yes, we require Python 3.9 or higher.