python
  • python-2.7
  • numpy
  • matplotlib
  • 2017-04-25 95 views 2 likes 
    2

    我正在尝试在Raspbian Jessie的全新安装(4.4的写入时间)上安装一个覆盆子pi上的matplotlib。我正在尝试为Python 2.7安装matplotlib。pip安装matplotlib在Raspbian Jessie上失败4.4

    我不断收到以下错误:

    command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-HPuMoo/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l3s1dW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-HPuMoo/matplotlib 
    
    Storing debug log for failure in /home/pi/.pip/pip.log 
    

    使事情变得复杂......当我安装其他程序包(没有问题,刚安装的virtualenv),这不会发生,但是当我尝试升级它确实发生numpy的。另外,在Python的主分布(/ usr/bin/python)或虚拟环境(/ home/pi/Envs/test/bin/python)上工作时会出现此错误。然后,我在主分发上使用pip 1.5.6,在virtualenv上使用9.0.1。都失败了。 :(

    不知道为什么我有这个问题......考虑如何广泛使用matplotlib是(以及如何满载Python包杰西是),你会以为不会有什么问题。HM。

    +0

    你什么命令来启动安装?任何有用的' pip.log'? – kazemakase

    +0

    我只是在做'pip install matplotlib'。日志的结尾写着'error:command'arm-linux-gnueabihf-gcc'fail ed退出状态1' – ajdigregorio

    +0

    你可以发布日志的相关部分吗? (也就是说,如果你能分辨哪个部分是相关的,是否不太长) – kazemakase

    回答

    2

    this answer by Peter Brittain and Anshuman Chhabra,安装libpulse-devpython-dev图书馆应解决您的问题。作为对Debian Packages references显示,这些库的文件列表包含所需的文件。

    +0

    这对我有效!不知道为什么默认情况下没有安装python-dev和libpulse-dev,但这对rpi开发人员来说是一个问题。 – ajdigregorio

    +0

    @ajdigregorio - 很高兴听到它的工作! – seanbaird

    相关问题