googleapis / python-crc32c

Apache License 2.0
22 stars 25 forks source link

Warning message running on Raspberry pi - crc32c problem #173

Closed daverdalas closed 7 months ago

daverdalas commented 1 year ago

Hi, I have no problem running aiortc on my Mac. However when I tried moving code to Raspberry Pi I receive this message:

/home/daverremote/.local/lib/python3.9/site-packages/google_crc32c/__init__.py:29: RuntimeWarning: As the c extension couldn't be imported, `google-crc32c` is using a pure python implementation that is significantly slower. If possible, please configure a c build environment and compile the extension
  warnings.warn(_SLOW_CRC32C_WARNING, RuntimeWarning)

I tried different version of google-crc32c, installed crc32c with pip3 install crc32c but whatever I try I get the same error :(

Package versions:

daverremote@raspberrypi:~/Dokumenty/Projects $ pip3 install aiortc
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: aiortc in /home/daverremote/.local/lib/python3.9/site-packages (1.5.0)
Requirement already satisfied: aioice<1.0.0,>=0.9.0 in /home/daverremote/.local/lib/python3.9/site-packages (from aiortc) (0.9.0)
Requirement already satisfied: av<11.0.0,>=9.0.0 in /home/daverremote/.local/lib/python3.9/site-packages (from aiortc) (10.0.0)
Requirement already satisfied: cffi>=1.0.0 in /usr/local/lib/python3.9/dist-packages (from aiortc) (1.15.1)
Requirement already satisfied: cryptography>=2.2 in /home/daverremote/.local/lib/python3.9/site-packages (from aiortc) (41.0.1)
Requirement already satisfied: google-crc32c>=1.1 in /home/daverremote/.local/lib/python3.9/site-packages (from aiortc) (1.5.0)
Requirement already satisfied: pyee>=9.0.0 in /home/daverremote/.local/lib/python3.9/site-packages (from aiortc) (10.0.1)
Requirement already satisfied: pylibsrtp>=0.5.6 in /home/daverremote/.local/lib/python3.9/site-packages (from aiortc) (0.8.0)
Requirement already satisfied: pyopenssl>=23.1.0 in /home/daverremote/.local/lib/python3.9/site-packages (from aiortc) (23.2.0)
Requirement already satisfied: dnspython>=2.0.0 in /home/daverremote/.local/lib/python3.9/site-packages (from aioice<1.0.0,>=0.9.0->aiortc) (2.3.0)
Requirement already satisfied: ifaddr>=0.2.0 in /home/daverremote/.local/lib/python3.9/site-packages (from aioice<1.0.0,>=0.9.0->aiortc) (0.2.0)
Requirement already satisfied: pycparser in /home/daverremote/.local/lib/python3.9/site-packages (from cffi>=1.0.0->aiortc) (2.21)
Requirement already satisfied: typing-extensions in /usr/lib/python3/dist-packages (from pyee>=9.0.0->aiortc) (3.7.4.3)

Any ideas how to fix it?

marcus2vinicius commented 10 months ago

I tried compile directly in C https://github.com/google/crc32c but the msg about _SLOW_CRC32C_WARNING keep for me

parthea commented 7 months ago

See https://github.com/googleapis/python-crc32c/issues/83#issuecomment-910515271 which includes a Dockerfile to avoid using pure python for users who are on non-manylinux Linux platforms. I'm going to close this issue but please feel free to open a new issue with more information. If you're still having issues after trying https://github.com/googleapis/python-crc32c/issues/83#issuecomment-910515271 please also share the Dockerfile to help reproduce the issue.