esp-dl icon indicating copy to clipboard operation
esp-dl copied to clipboard

tools/quantization_tool/examples/example.py failed (AIV-549)

Open ghost opened this issue 2 years ago • 7 comments

Traceback (most recent call last):
  File "/home/li/esp32/esp-who/components/esp-dl/tools/quantization_tool/examples/example.py", line 16, in <module>
    from calibrator import *
ImportError: /home/li/esp32/esp-who/components/esp-dl/tools/quantization_tool/examples/../linux/calibrator.so: undefined symbol: _Py_CheckRecursionLimit

env: python 3.10

tried to install python3.7.13 but failed because of no specified version of numba

ghost avatar Sep 03 '22 01:09 ghost

Hi, pls check env requirements:

Environment Requirements: Python == 3.7 Numba == 0.53.1 ONNX == 1.9.0 ONNX Runtime == 1.7.0 ONNX Optimizer == 0.2.6 You can install python packages with requirement.txt:

pip install -r requirement.txt

Sandra-lol avatar Sep 05 '22 11:09 Sandra-lol

Environment requirements are all satisfied, but this issue still seems to be cropping up. Trying on macOS

Traceback (most recent call last): File "example.py", line 16, in from calibrator import * ModuleNotFoundError: No module named 'calibrator'

adarsh2897 avatar Oct 26 '22 10:10 adarsh2897

https://github.com/espressif/esp-dl/issues/93#issuecomment-1292936169

ghost avatar Oct 27 '22 03:10 ghost

#93 (comment)

I'm not sure what I need to do here, I already have all the modules installed. The error is as follows:

ImportError: dlopen(../calibrator.so, 0x0002): tried: '../calibrator.so' (not a mach-o file)

I'm using macOS Monterrey. From my understanding, dlopen() cannot open .so files as they are for linux. Where would I be able to recompile the libraries to get them as .dylib?

adarsh2897 avatar Oct 27 '22 05:10 adarsh2897

Traceback (most recent call last):
  File "/home/li/esp32/esp-who/components/esp-dl/tools/quantization_tool/examples/example.py", line 16, in <module>
    from calibrator import *
ImportError: /home/li/esp32/esp-who/components/esp-dl/tools/quantization_tool/examples/../linux/calibrator.so: undefined symbol: _Py_CheckRecursionLimit

env: python 3.10

tried to install python3.7.13 but failed because of no specified version of numba

Do you still got that error? I tried it in google colab, to create an environment (with the requirements.txt) but somehow it isn't working. I wonder if somebody got it working…

This is my environment:

blinker==1.4
dbus-python==1.2.18
distro==1.7.0
jeepney==0.7.1
keyring==23.5.0
launchpadlib==1.10.16
lazr.restfulclient==0.14.4
lazr.uri==1.0.6
llvmlite==0.36.0
numba==0.53.1
numpy==1.21.6
onnx==1.9.0
onnxoptimizer==0.2.6
onnxruntime==1.7.0
protobuf==3.20.1
PyGObject==3.42.1
PyJWT==2.3.0
python-apt==2.4.0+ubuntu2
SecretStorage==3.3.1
six==1.16.0
typing_extensions==4.7.1
wadllib==1.3.6

MichelBerg avatar Jan 18 '24 09:01 MichelBerg

also having this issue on macOS. i've tried everything; please help

lidar-guy avatar Jul 26 '24 17:07 lidar-guy

The quantization tool for ESP-DL only supports Linux and Windows platforms now.

BlueSkyB avatar Jul 29 '24 02:07 BlueSkyB