Memory error while using pip install Matplotlib

后端 未结 3 1693
自闭症患者
自闭症患者 2020-11-30 19:21

I am using Python 2.7, If i try to install Matplotlib I am getting this error if i use \"pip install matplotlib\"

 Exception:
  Traceback (most recent call l         


        
3条回答
  •  不知归路
    2020-11-30 19:53

    It seems that you have insufficient RAM to build matplotlib from scratch. To overcome that, either turn on swap:

    # create swap file of 512 MB
    dd if=/dev/zero of=/swapfile bs=1024 count=524288
    # modify permissions
    chown root:root /swapfile
    chmod 0600 /swapfile
    # setup swap area
    mkswap /swapfile
    # turn swap on
    swapon /swapfile
    

    Or, if you have raspbian installed on your SD card, you can install matplotlib from the repository:

    apt-get install python-matplotlib
    

提交回复
热议问题