我试图通过这个链接在我的 ubuntu 16.04 上安装 python 3.7 。它正在安装它而没有任何错误,它返回:
which python3.7
/usr/local/bin/python3.7
当我运行时,我还有其他 python 版本(3.5 和 2.7):
which python
/usr/bin/python
但我不能在 3.7 中导入 numpy :
python3.7
Python 3.7.2 (default, Feb 19 2019, 13:25:43)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
>>>
我试图安装 numpy :
python-numpy is already installed at the requested version (1:1.11.0-1ubuntu1)
此外,我在 3.5 中没有这个问题:
python3.5
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>
有人能告诉我这里有什么问题吗?!!!我该如何解决这个问题?