gpt4 book ai didi

python - 下载了Python版的SciPy,无法使用

转载 作者:行者123 更新时间:2023-12-01 08:41:54 25 4
gpt4 key购买 nike

我正在尝试下载并使用 SciPy。根据 pip,我已经下载了它,但是当我尝试使用它时,python 说没有名为 SciPy 的模块。我尝试过使用 python 以及 python3。这是我的控制台的副本:

➜  ~ pip3 install SciPy
Requirement already satisfied: SciPy in /usr/local/lib/python3.6/site-packages (0.19.1)
Requirement already satisfied: numpy>=1.8.2 in /usr/local/lib/python3.6/site-packages (from SciPy) (1.14.3)
➜ ~ pip install SciPy
Requirement already satisfied: SciPy in /usr/local/lib/python3.6/site-packages (0.19.1)
Requirement already satisfied: numpy>=1.8.2 in /usr/local/lib/python3.6/site-packages (from SciPy) (1.14.3)
➜ ~ python
Python 2.7.15 (default, Jun 2 2018, 12:02:49)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import SciPy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named SciPy
>>> exit()
➜ ~ python3
Python 3.6.5 (default, Apr 28 2018, 01:16:46)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import SciPy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'SciPy'
>>> exit()
➜ ~

最佳答案

导入区分大小写。使用

import scipy

关于python - 下载了Python版的SciPy,无法使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53465560/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com