我是一个业余程序员。我正在尝试使用:import thinkdsp as dspimport thinkplot as plt我已经安装了该pip install thinkx模块,但我一直收到该错误,我不明白为什么。我将在下面保留控制台显示的内容:Traceback (most recent call last): File "Karaokemaker1.py", line 1, in <module> import thinkdsp as dsp File "C:\Users\keigo\anaconda3\lib\site-packages\thinkdsp.py", line 17, in <module> import scipy.stats File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\stats\__init__.py", line 384, in <module> from .stats import * File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\stats\stats.py", line 185, in <module> from . import distributions File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\stats\distributions.py", line 10, in <module> from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous, File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\stats\_distn_infrastructure.py", line 25, in <module> from scipy import optimize File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\optimize\__init__.py", line 390, in <module> from ._minimize import * File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\optimize\_minimize.py", line 30, in <module> from ._trustregion_constr import _minimize_trustregion_constr File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\__init__.py", line 4, in <module> from .minimize_trustregion_constr import _minimize_trustregion_constr File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py", line 4, in <module> from scipy.sparse.linalg import LinearOperator File "C:\Users\keigo\anaconda3\lib\site-packages\scipy\sparse\linalg\__init__.py", line 116, in <module> from .eigen import *我认为问题出在scipy因为以下所有错误都来自该模块。我检查了一下,我已经为scipy模块正确安装了所有东西。请帮忙!谢谢你!
3 回答
梦里花落0921
TA贡献1772条经验 获得超6个赞
您好,我遇到了与您相同的问题。根据您使用的 python 版本,您应该选择一个版本 thinkx。我建议你去thinkx的网站看看过去的udapte。在我的例子中,matplotlib 3.3.1 用于 python 3.7。我进入 git bash 并使用
pip install matplotlib==3.0.1
一切正常。我对 seaborn 也有同样的问题并且它有效。
添加回答
举报
0/150
提交
取消