Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

TypeError: Shared Cython type cython_function_or_method has the wrong size, try recompiling

sphrz
New Contributor I
4,694 Views

I was running the Post-Training Optimization Tool and was getting a few errors since this was my first time trying to follow the documentation and figure out how to correctly configure the configuration file to quantize the sample model.

 

I started to get a random error after a few more trial and errors with the tool and this started showing up:

 

TypeError: Shared Cython type cython_function_or_method has the wrong size, try recompiling

 

I am not exactly sure how to fix this and have not found anyone else with this error online as well. Any suggestions? The picture attached is the error and output.

Labels (1)
0 Kudos
1 Solution
4 Replies
sphrz
New Contributor I
4,667 Views

Another thing. I was running python 3.7 because certain modules did not play nicely with Python 3.8+. Here is the warning that I believe is causing the TypeError:

 

accuracy_checker WARNING: /home/destrada/anaconda3/envs/ncs2_3.8/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.8 of module 'openvino.inference_engine.ie_api' does not match runtime version 3.7
return f(*args, **kwds)

 

This happens with accuracy_checker and quatnizer tool. How do I recompile to have the:

compiletime version 3.8 of module 'openvino.inference_engine.ie_api'

 

be 3.7?  I did a fresh install as well and still the same error.

0 Kudos
IntelSupport
Moderator
4,645 Views

Hi Damon,

 

Thank you for reaching out. I would suggest you use Python 3.7 version to run the OpenVINO toolkit. If possible, could you reinstall and set up the Post-Training Optimization Tool? Please refer to the following guide: https://docs.openvinotoolkit.org/latest/pot_README.html#install_and_set_up_post_training_optimization_tool

 

Regards,

Adli


IntelSupport
Moderator
4,609 Views

Hi Damon,


This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.


Regards,

Adli


0 Kudos
Reply