我在 ML 10.8里安装了 PyDev 和 Scipy Superpack,但是我在Eclipse的PyDev里还是不能import Matplotlib,Scipy,可以import Numpy进行Python编程。请问该如何配置import Matplotlib,Scipy?
根据 Scipy Superpack 的安装脚本,[code]
echo 'Installing readline ...'
${SUDO} "${PYTHON}" -m easy_install -N -Z readline
echo 'Installing nose ...'
${SUDO} "${PYTHON}" -m easy_install -N -Z nose
echo 'Installing six'
${SUDO} "${PYTHON}" -m easy_install -N -Z six
echo 'Installing python-dateutil'
${SUDO} "${PYTHON}" -m easy_install -N -Z python-dateutil
echo 'Installing pytz'
${SUDO} "${PYTHON}" -m easy_install -N -Z pytz
echo 'Installing Tornado'
${SUDO} "${PYTHON}" -m easy_install -N -Z tornado
echo 'Installing pyzmq'
${SUDO} "${PYTHON}" -m easy_install -N -Z pyzmq
echo 'Installing pika'
${SUDO} "${PYTHON}" -m easy_install -N -Z pika
echo 'Installing patsy'
${SUDO} "${PYTHON}" -m easy_install -N -Z patsy
它只装了这八个包而已。你到命令行下试一试 easy_install matplotlib ,应该就可以解决了,如果不行的话,告诉我提示是什么。
如果还是不行,建议你推倒重来,这里有个安装 matplotlib、numpy、scipy、ipython 的教程,你可以照它做一遍,最后安装 Eclipse 和 PyDev 即可。
http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/
原发布于 https://www.zhihu.com/question/20543084/answer/15433331