gpt4 book ai didi

scipy 导入错误 : dlopen no suitable image found in Python 3

转载 作者:行者123 更新时间:2023-12-05 07:38:31 33 4
gpt4 key购买 nike

我有 python 3.6,Mac OS X El Capitan。我通过 pip install scipy 安装了 scipy。但是当我导入 scipy 时,出现以下错误:

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scipy/init.py in () 116 del _NumpyVersion 117 --> 118 from scipy._lib._ccallback import LowLevelCallable 119 120 from scipy._lib._testutils import PytestTester

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scipy/_lib/_ccallback.py in () ----> 1 from . import _ccallback_c 2 3 import ctypes 4 5 PyCFuncPtr = ctypes.CFUNCTYPE(ctypes.c_void_p).bases[0]

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scipy/_lib/_ccallback_c.cpython-36m-darwin.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scipy/_lib/_ccallback_c.cpython-36m-darwin.so: mach-o, but wrong architecture

我在 Python2 中没有遇到这个错误。

最佳答案

看来我是地球上唯一遇到此问题的人。幸运的是,我经过无数次尝试才让它发挥作用。万一以后有人遇到同样的错误,你可以试试这个:python -m pip install scipy。我不知道为什么 pip install scipy 不起作用。

关于scipy 导入错误 : dlopen no suitable image found in Python 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47858150/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com