Required prerequisites
What version of OpTree are you using?
0.13.1
System information
Installation: pip (please check problem description)
Python: 3.12.8 (Windows ARM64)
Platform: Windows ARM64
Optree Version: 0.13.1
Problem description
Windows ARM64 version of optree has a problem on import.
optree-0.13.1-cp313-cp313-win_arm64.whl
If you install it with regular command (by wheel file):
pip install optree
or to prevent any cache
pip install optree --no-cache-dir
ImportError: cannot import name '_C' from partially initialized module 'optree' (most likely due to a circular import)
If you install it via source code (Visual Studio C++ Build Tools are installed in system):
pip install --no-binary optree optree
or
pip install --no-binary optree optree --no-cache-dir
It is successfully being installed and working without any problem.
Reproducible example code
Traceback
Traceback (most recent call last):
File "main.py", line 1, in <module>
import optree
File "__init__.py", line 17, in <module>
from optree import accessor, dataclasses, functools, integration, typing
File "site-packages\optree\accessor.py", line 36, in <module>
from optree import _C
ImportError: cannot import name '_C' from partially initialized module 'optree' (most likely due to a circular import) (optree\__init__.py)
Expected behavior
It should import optree without any problem.
Additional context
Most probably there is a problem on generation of Windows ARM64 wheel.
Until fixing the issue, as a workaround, you might also consider to remove optree-0.13.1-cp313-cp313-win_arm64.whl from wheel list to force build on Windows ARM64.
Required prerequisites
What version of OpTree are you using?
0.13.1
System information
Installation:
pip(please check problem description)Python: 3.12.8 (Windows ARM64)
Platform: Windows ARM64
Optree Version:
0.13.1Problem description
Windows ARM64 version of
optreehas a problem onimport.optree-0.13.1-cp313-cp313-win_arm64.whl
If you install it with regular command (by wheel file):
or to prevent any cache
If you install it via source code (Visual Studio C++ Build Tools are installed in system):
or
It is successfully being installed and working without any problem.
Reproducible example code
Traceback
Expected behavior
It should
import optreewithout any problem.Additional context
Most probably there is a problem on generation of Windows ARM64 wheel.
Until fixing the issue, as a workaround, you might also consider to remove
optree-0.13.1-cp313-cp313-win_arm64.whlfrom wheel list to force build on Windows ARM64.