Bezier package incompatible with Code 2022.2.0

Hello,

I am working on a Project where we use the bezier package. So far I worked with Code 2022.1.3 and I had no issues.

After updating to Omniverse Code 2022.2.0 I am getting the following import error when my extension tries to install the package:

2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin] ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin] 
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin] At:
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   src/python/bezier/_speedup.pyx(1): init bezier._speedup
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(219): _call_with_frames_removed
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap_external>(1050): exec_module
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(677): _load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(967): _find_and_load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(983): _find_and_load
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(219): _call_with_frames_removed
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(1043): _handle_fromlist
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   C:\Users\USERNAME\AppData\Local\ov\data\Kit\Code\2022.2\pip3-envs\default\bezier\_curve_helpers.py(25): <module>
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(219): _call_with_frames_removed
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap_external>(728): exec_module
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(677): _load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(967): _find_and_load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(983): _find_and_load
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(219): _call_with_frames_removed
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(1043): _handle_fromlist
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   C:\Users\USERNAME\AppData\Local\ov\data\Kit\Code\2022.2\pip3-envs\default\bezier\triangle.py(27): <module>
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(219): _call_with_frames_removed
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap_external>(728): exec_module
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(677): _load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(967): _find_and_load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(983): _find_and_load
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(219): _call_with_frames_removed
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(1043): _handle_fromlist
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   C:\Users\USERNAME\AppData\Local\ov\data\Kit\Code\2022.2\pip3-envs\default\bezier\_legacy.py(17): <module>
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(219): _call_with_frames_removed
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap_external>(728): exec_module
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(677): _load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(967): _find_and_load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(983): _find_and_load
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   C:\Users\USERNAME\AppData\Local\ov\data\Kit\Code\2022.2\pip3-envs\default\bezier\__init__.py(30): <module>
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(219): _call_with_frames_removed
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap_external>(728): exec_module
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(677): _load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(967): _find_and_load_unlocked
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(983): _find_and_load
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   <frozen importlib._bootstrap>(1006): _gcd_import
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   c:\users\USERNAME\appdata\local\ov\pkg\code-2022.2.0\kit\python\lib\importlib\__init__.py(127): import_module
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   c:\users\USERNAME\appdata\local\ov\pkg\code-2022.2.0\kit\extscore\omni.kit.pipapi\omni\kit\pipapi\pipapi.py(193): _try_import
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   c:\users\USERNAME\appdata\local\ov\pkg\code-2022.2.0\kit\extscore\omni.kit.pipapi\omni\kit\pipapi\pipapi.py(232): install
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   c:\users\USERNAME\appdata\local\ov\pkg\code-2022.2.0\kit\extscore\omni.kit.pipapi\omni\kit\pipapi\pipapi.py(61): wrapper
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin]   executing: Python 0...(3): <module>
2022-11-15 08:44:30  [Error] [carb.scripting-python.plugin] 

From what I could read online this is due to an incompatibility with the numpy version, however, I checked both numpy versions of Code 2022.2.0 and Code 2022.1.3 and they are both using the same version (1.19.0). Furthermore, the Python version seems to also be the same (3.7.13).

Did something else change in the python enviroment that produced this error?

Steps to reproduce:

  1. Open Omniverse Code 2022.2.0

  2. Run the following command in the Script Editor to install bezier:

       import omni
       omni.kit.pipapi.install("bezier")
    

Hi @jominga. It looks like bezier is pulling in a newer numpy version when it’s installed. I’m checking with the dev team to see what’s up.

The good news is that it looks like we’re including bezier in the next Code version. You can already use it in Create-2022.3.0.

I’ve logged this internal issue: OM-72852.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.