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

最新版1.3.4安装,numpy报异常 #1251

Open
felixruan opened this issue Sep 20, 2024 · 1 comment
Open

最新版1.3.4安装,numpy报异常 #1251

felixruan opened this issue Sep 20, 2024 · 1 comment

Comments

@felixruan
Copy link

felixruan commented Sep 20, 2024

  • 图像识别、设备控制相关问题

描述问题bug
pip install airtest,对应的numpy版本是2.0.2。然后测试代码中引入:
from airtest.core.android.adb import ADB
报错如下异常:

RuntimeError: module compiled against ABI version 0x1000009 but this version of numpy is 0x2000000
Traceback (most recent call last):
  File "D:\python\test\testcompat.py", line 22, in setup_test_compat
    from airtest.core.android.adb import ADB
  File "D:\python\test\venv\lib\site-packages\airtest\core\android\__init__.py", line 4, in <module>
    from airtest.core.android.android import Android
  File "D:\python\test\venv\lib\site-packages\airtest\core\android\android.py", line 8, in <module>
    from airtest import aircv
  File "D:\python\test\venv\lib\site-packages\airtest\aircv\__init__.py", line 1, in <module>
    from .aircv import *  # noqa
  File "D:\python\test\venv\lib\site-packages\airtest\aircv\aircv.py", line 5, in <module>
    import cv2
  File "D:\python\test\venv\lib\site-packages\cv2\__init__.py", line 181, in <module>
    bootstrap()
  File "D:\python\test\venv\lib\site-packages\cv2\__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "importlib\__init__.py", line 127, in import_module
    applySysPathWorkaround = True
ImportError: numpy.core.multiarray failed to import

python 版本: python3.9.12

airtest 版本: 1.3.4

Package Version


airtest 1.3.4
cached-property 1.5.2
certifi 2024.8.30
charset-normalizer 3.3.2
colored 2.2.4
construct 2.10.70
decorator 5.1.1
Deprecated 1.2.14
deprecation 2.1.0
facebook-wda 1.4.9
ffmpeg-python 0.2.0
filelock 3.16.1
future 1.0.0
idna 3.10
Jinja2 3.1.4
logzero 1.7.0
MarkupSafe 2.1.5
mss 6.1.0
numpy 2.0.2
opencv-contrib-python 4.6.0.66
packaging 24.1
pillow 10.4.0
pip 22.0.4
psutil 6.0.0
py 1.11.0
python-xlib 0.33
pywinauto 0.6.3
requests 2.32.3
retry 0.9.2
setuptools 58.1.0
simple-tornado 0.2.2
simplejson 3.19.3
six 1.16.0
tabulate 0.9.0
tidevice 0.12.10
tornado 6.4.1
urllib3 2.2.3
wheel 0.37.1
wrapt 1.16.0

@felixruan
Copy link
Author

需要手动降低numpy的版本至
pip install numpy==1.26.4

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