numpy 为什么我不能从river导入指标,它给出了这个错误

dojqjjoe  于 2023-03-23  发布在  其他
关注(0)|答案(1)|浏览(106)

我试图从Colab上的River导入指标,但我目前安装的numpy和River使用的版本可能存在一些版本不匹配
from river import metrics我正在尝试运行此程序,但收到以下错误

ImportError: numpy.core.multiarray failed to import

RuntimeError                              Traceback (most recent call last)
__init__.pxd in numpy.import_array()

RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-6-3108f4ad0000> in <module>
----> 1 from river import metrics
      2 from river import stream
      3 from river import preprocessing
      4 from river import tree,neighbors,naive_bayes,ensemble,linear_model
      5 from river.drift import DDM, ADWIN, EDDM, PageHinkley, KSWIN, HDDM_A, HDDM_W

1 frames
/usr/local/lib/python3.9/dist-packages/river/metrics/mutual_info.py in <module>
      4 
      5 from river import metrics
----> 6 from river.metrics.expected_mutual_info import expected_mutual_info
      7 
      8 __all__ = [

build/lib.linux-x86_64-cpython-38/river/metrics/expected_mutual_info.pyx in init river.metrics.expected_mutual_info()

__init__.pxd in numpy.import_array()

ImportError: numpy.core.multiarray failed to import
cvxl0en2

cvxl0en21#

这个pip install numpy==1.8.0解决了类似的我.尝试升级numpy.

相关问题