3

scipy.stats から pearsonr をインポートしようとしたときに、このエラーが発生しました。

from scipy.stats import pearsonr

エラー表示:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/scipy/stats/__init__.py", line 7, in <module>
from stats import *
File "/usr/lib/python2.7/dist-packages/scipy/stats/stats.py", line 198, in <module>
import distributions
File "/usr/lib/python2.7/dist-packages/scipy/stats/distributions.py", line 87, in <module>
from new import instancemethod
File "new.py", line 2, in <module>
import matplotlib.pyplot as plt
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 23, in <module>
from matplotlib.figure import Figure, figaspect
File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 18, in <module>
from axes import Axes, SubplotBase, subplot_class_factory
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 8537, in <module>
Subplot = subplot_class_factory()
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 8529, in subplot_class_factory
new_class = new.classobj("%sSubplot" % (axes_class.__name__),
AttributeError: 'module' object has no attribute 'classobj'

解決策はありますか?

4

1 に答える 1