Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 3.13 能安装,运行错误 #352

Open
vincentaxhe opened this issue Jan 8, 2025 · 0 comments
Open

python 3.13 能安装,运行错误 #352

vincentaxhe opened this issue Jan 8, 2025 · 0 comments

Comments

@vincentaxhe
Copy link

vincentaxhe commented Jan 8, 2025

venv安装好后,运行出错,之前用3.12运行没问题的,现在重来,需要arch安装python 3.12,再整个pip安装以前仓库里就有的包,不再能用系统3.13的包。希望改变内部numpy的问题,使python 3.13能配合numpy。

/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/mxnet/numpy/utils.py:36: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  bool = onp.bool
Traceback (most recent call last):
  File "/home/vincent/disk/bin/cnocr/test.py", line 1, in <module>
    from cnocr import CnOcr
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/cnocr/__init__.py", line 1, in <module>
    from .cn_ocr import CnOcr
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/cnocr/cn_ocr.py", line 21, in <module>
    import mxnet as mx
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/mxnet/__init__.py", line 31, in <module>
    from . import contrib
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/mxnet/contrib/__init__.py", line 30, in <module>
    from . import text
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/mxnet/contrib/text/__init__.py", line 23, in <module>
    from . import embedding
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/mxnet/contrib/text/embedding.py", line 39, in <module>
    from ... import numpy as _mx_np
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/mxnet/numpy/__init__.py", line 28, in <module>
    from .utils import *  # pylint: disable=wildcard-import
    ^^^^^^^^^^^^^^^^^^^^
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/mxnet/numpy/utils.py", line 36, in <module>
    bool = onp.bool
           ^^^^^^^^
  File "/home/vincent/disk/bin/cnocr/venv/lib/python3.13/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant