开发者

Installing Matplotlib - errors importing numpy in test command

开发者 https://www.devze.com 2023-02-06 07:28 出处:网络
I\'m having trouble getting matplotlib up and running.I\'ve downloaded it, but when I try to run the test command python -c \'import matplotlib; print matplotlib.__version__, matplotlib.__file__\' I g

I'm having trouble getting matplotlib up and running. I've downloaded it, but when I try to run the test command python -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__' I get the following errors

Traceback (most recent call last)开发者_开发问答:
  File "<string>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.py", line 135, in <module>
    from matplotlib.rcsetup import (defaultParams,
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/rcsetup.py", line 19, in <module>
    from matplotlib.colors import is_color_like
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/colors.py", line 52, in <module>
    import numpy as np
ImportError: No module named numpy

I know I have numpy installed, as I've used numpy and can work with it. import numpy in the python shell works just fine.

Maybe this is a PATH issue, but I'm not really sure.

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消