使用numpy.array会抛出AttributeError

时间:2016-11-20 17:58:34

标签: python numpy attributeerror

我尝试在Python中导入numpy包,并且由于路径变量,最初遇到了很多问题。处理完该问题并导入numpy后,使用数组对象会给我一个属性错误。

>>import numpy
>>x=numpy.array([1,2,3])
Traceback (most recent call last):
  File "<stdin>",line 1, in <module>
AttributeError: 'module' object has no attribute 'array'

请帮忙。

1 个答案:

答案 0 :(得分:1)

My attempt of running that code

好像你的numpy输入不正确。你试过用pip吗?

相关问题