运行时错误:找不到与 ImageSensor 匹配的 Python 模块

RuntimeError: Matching Python module for ImageSensor not found

本文关键字:Python 模块 ImageSensor 找不到 运行时错误      更新时间:2023-10-16

我想运行这个测试:https://github.com/numenta/htmresearch/tree/master/projects/image_test但是当我执行python run_mnist_experiment.py时,我得到一个错误:

    ERR:  Matching Python module for ImageSensor not found. [/root/bamboo-agent-home/xml-data/build-dir/NUP-CORE-NCRM/src/nupic/engine/RegionImplFactory.cpp line 444]
Traceback (most recent call last):
  File "/home/roy/PycharmProjects/htm/run_mnist_experiment.py", line 237, in <module>
    net = createNetwork()
  File "/home/roy/PycharmProjects/htm/run_mnist_experiment.py", line 98, in createNetwork
    json.dumps(DEFAULT_IMAGESENSOR_PARAMS))
  File "/home/roy/.local/lib/python2.7/site-packages/nupic/engine/__init__.py", line 639, in addRegion
    engine_internal.Network.addRegion(self, name, nodeType, nodeParams)
  File "/home/roy/.local/lib/python2.7/site-packages/nupic/bindings/engine_internal.py", line 1167, in addRegion
    return _engine_internal.Network_addRegion(self, *args, **kwargs)
RuntimeError: Matching Python module for ImageSensor not found.

所以我执行pip install ImageSensor,但我得到了这个:

Collecting ImageSensor
  Could not find a version that satisfies the requirement ImageSensor (from versions: )
No matching distribution found for ImageSensor

我该怎么做才能运行此测试?

在谷歌和numenta存储库上搜索后,我发现这个模块可以在nupic.vision中找到。因此,您只需要安装该存储库。这是我在谷歌上找到的来源。只需使用它来解决您的问题。

模块本身可以在那里找到:https://github.com/numenta/nupic.vision/blob/master/src/nupic/vision/regions/ImageSensor.py