代码:
import numpy as np
a=np.array([1,2,3])
print(a)
错误:
Traceback (most recent call last):
File "C:\Users\Jeffhacks\Desktop\np.py", line 1, in <module>
import numpy as np
File "C:\Users\Jeffhacks\Desktop\numpy.py", line 1, in <module>
import numpy.array as np
ModuleNotFoundError: No module named 'numpy.array'; 'numpy' is not a package
但是,我已经在我的电脑中安装了 numpy。我该如何解决这个错误?