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

[Bug]: Some trouble running the script on windows #650

Open
VoQZHD opened this issue Jun 17, 2024 · 1 comment
Open

[Bug]: Some trouble running the script on windows #650

VoQZHD opened this issue Jun 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@VoQZHD
Copy link

VoQZHD commented Jun 17, 2024

Issue

ImportError: numpy.core.multiarray failed to import

installed using the first pip method

Command Line Arguments

anything

Console logs

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 148, in _get_module_details
  File "<frozen runpy>", line 112, in _get_module_details
  File "S:\Scanlation\manga-image-translator\manga_translator\__init__.py", line 7, in <module>
    from .manga_translator import *
  File "S:\Scanlation\manga-image-translator\manga_translator\manga_translator.py", line 5, in <module>
    import cv2
  File "S:\Scanlation\venv\Lib\site-packages\cv2\__init__.py", line 181, in <module>
    bootstrap()
  File "S:\Scanlation\venv\Lib\site-packages\cv2\__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "C:\Python312\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
AttributeError: _ARRAY_API not found
Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 148, in _get_module_details
  File "<frozen runpy>", line 112, in _get_module_details
  File "S:\Scanlation\manga-image-translator\manga_translator\__init__.py", line 7, in <module>
    from .manga_translator import *
  File "S:\Scanlation\manga-image-translator\manga_translator\manga_translator.py", line 5, in <module>
    import cv2
  File "S:\Scanlation\venv\Lib\site-packages\cv2\__init__.py", line 181, in <module>
    bootstrap()
  File "S:\Scanlation\venv\Lib\site-packages\cv2\__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: numpy.core.multiarray failed to import
@VoQZHD VoQZHD added the bug Something isn't working label Jun 17, 2024
@77degrees
Copy link
Contributor

numpy got updated to 2.0 and py3landid added support for numpy 2.0. Try the below, and it should work; it did for me.

pip install py3landid==0.2.2
pip install numpy==1.23.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants