【发布时间】:2020-11-28 11:31:19
【问题描述】:
我已尝试安装 numpy,但出现 invalid syntax 错误。
这似乎是一个常见问题,因为我在网上搜索了解决方案,here-here-和here
我已经尝试了所有三个,但似乎无法弄清楚。 我是 python 的初学者,所以这种做事方式对我来说是新的。我目前已经安装了最新的 python 3.9,有什么我可能错过的吗?
【问题讨论】:
-
你试过哪个命令?什么时候出现这个错误,导入
numpy的时候? -
我在 python idle 中尝试过
pip install numpy;虽然我已经读过我必须在 cmd.exe 上安装numpy,但当我尝试这个时它找不到pip。我最近才开始安装,所以numpy是我的第二次安装,而math安装正确,是我的第一次安装。 -
哪个操作系统?你能查一下
python -V -
@Shijith 返回
namerror: name python is not defined -
python -Vin cmd not in idle, 还有where pip, docs.python.org/3/using/windows.html#configuring-python