Numpy import throws AttributeError: 'module' object has no attribute 'core'

后端 未结 5 1755
清歌不尽
清歌不尽 2020-12-10 16:28
import numpy as np
  File \"/home/anirrudh/.virtualenvs/ml4t2/local/lib/python2.7/site-packages/numpy/__init__.py\", line 180, in 
    from . import ad         


        
5条回答
  •  星月不相逢
    2020-12-10 16:53

    (Answer posted on behalf of the OP).

    Update: Resolved.

    I had created a python file for one of my projects name random.py and when numpy is imported, it was calling this file instead of it's own library file hence resulting in the error. I had to delete/rename random.py which I created and that fixed the issue.

提交回复
热议问题