Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
导入错误:/usr/local/lib/python3.2/dist-packages/matplotlib//\u path.so:文件太短_Python_Python 3.x_Matplotlib_Raspberry Pi_Raspbian - Fatal编程技术网

导入错误:/usr/local/lib/python3.2/dist-packages/matplotlib//\u path.so:文件太短

导入错误:/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

我正在尝试在我的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/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年历史的餐厅,更新它不会有什么坏处