AttributeError: module ‘numpy‘ has no attribute ‘version‘

___________ ERROR collecting zoo/pipeline/api/onnx/mapper/flatten.py ___________
/opt/work/conda/envs/py37/lib/python3.7/site-packages/py/_path/local.py:704: in pyimport
    __import__(modname)
../zoo/__init__.py:17: in <module>
    from zoo.common.nncontext import *
../zoo/common/__init__.py:17: in <module>
    from .utils import *
../zoo/common/utils.py:16: in <module>
    from bigdl.util.common import Sample as BSample, JTensor as BJTensor,\
../../zoo/python_packages/sources/bigdl/util/common.py:28: in <module>
    from pyspark.mllib.common import callJavaFunc
<frozen importlib._bootstrap>:983: in _find_and_load
    ???
<frozen importlib._bootstrap>:967: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:668: in _load_unlocked
    ???
<frozen importlib._bootstrap>:638: in _load_backward_compatible
    ???
/opt/work/spark-3.0.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/mllib/__init__.py:30: in <module>
    ???
E   AttributeError: module 'numpy' has no attribute 'version'

测试出现这种情况,第一反应是numpy版本太低了,检查numpy版本正常,删除重装numpy无效,最后发现没有tensorflow,安装tensorflow就可以了,为什么和tensorflow有关原因不知。。。。。

你可能感兴趣的:(linux,linux)