导入错误:/usr/local/lib/python3.2/dist-packages/matplotlib//\u path.so:文件太短
我正在尝试在我的Raspberry Pi上安装matplotlib for Python 3。以下是我尝试导入模块时遇到的错误:导入错误:/usr/local/lib/python3.2/dist-packages/matplotlib//\u path.so:文件太短,python,python-3.x,matplotlib,raspberry-pi,raspbian,Python,Python 3.x,Matplotlib,Raspberry Pi,Raspbian,我正在尝试在我的Raspberry Pi上安装matplotlib for Python 3。以下是我尝试导入模块时遇到的错误: Traceback (most recent call last): File "/home/pi/GPIOtests/Accel.py", line 6, in <module> import matplotlib.pyplot as plt File "/usr/local/lib/python3.2/dist-packages/matp
Traceback (most recent call last):
File "/home/pi/GPIOtests/Accel.py", line 6, in <module>
import matplotlib.pyplot as plt
File "/usr/local/lib/python3.2/dist-packages/matplotlib/pyplot.py", line 28, in <module>
import matplotlib.colorbar
File "/usr/local/lib/python3.2/dist-packages/matplotlib/colorbar.py", line 32, in <module>
import matplotlib.artist as martist
File "/usr/local/lib/python3.2/dist-packages/matplotlib/artist.py", line 13, in <module>
from .transforms import (Bbox, IdentityTransform, TransformedBbox,
File "/usr/local/lib/python3.2/dist-packages/matplotlib/transforms.py", line 39, in <module>
from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
ImportError: /usr/local/lib/python3.2/dist-packages/matplotlib/_path.so: file too short
回溯(最近一次呼叫最后一次):
文件“/home/pi/GPIOtests/Accel.py”,第6行,在
将matplotlib.pyplot作为plt导入
文件“/usr/local/lib/python3.2/dist packages/matplotlib/pyplot.py”,第28行,在
导入matplotlib.colorbar
文件“/usr/local/lib/python3.2/dist packages/matplotlib/colorbar.py”,第32行,在
将matplotlib.artist作为martist导入
文件“/usr/local/lib/python3.2/dist packages/matplotlib/artist.py”,第13行,在
from.transforms导入(Bbox,IdentityTransform,TransformedBbox,
文件“/usr/local/lib/python3.2/dist packages/matplotlib/transforms.py”,第39行,在
从matplotlib.\u路径导入(仿射变换、计数\u盒\u重叠\u盒,
ImportError:/usr/local/lib/python3.2/dist-packages/matplotlib//\u path.so:文件太短
我做错了什么?也许可以帮上忙。Pi上怎么会有
python3.2
呢?我的Pi上默认有python 3和python 2。这是一个意外修复的问题,但不知道为什么……也许它只需要一家4年历史的餐厅,更新它不会有什么坏处