python error: no module named pylab

后端 未结 7 1471
北海茫月
北海茫月 2020-12-12 16:12

I am new to Python and want to use its plot functionality to create graphs. I am using ubuntu 12.04. I followed the Python installation steps from http://eli.th

7条回答
  •  生来不讨喜
    2020-12-12 16:36

    You'll need to install numpy, scipy and matplotlib to get pylab. In ubuntu you can install them with this command:

    sudo apt-get install python-numpy python-scipy python-matplotlib
    

    If you installed python from source you will need to install these packages through pip. Note that you may have to install other dependencies to do this, as well as install numpy before the other two.

    That said, I would recommend using the version of python in the repositories as I think it is up to date with the current version of python (2.7.3).

提交回复
热议问题