[SciPy-User] why pythonw works python not working?

Qian Xin chianshin@gmail....
Wed Jan 4 22:16:18 CST 2012


$ /c/Python26/python.exe draw.py
Traceback (most recent call last):
  File "draw.py", line 2, in <module>
    import matplotlib.pyplot as plt
  File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 23,
in <module>
    from matplotlib.figure import Figure, figaspect
  File "C:\Python26\lib\site-packages\matplotlib\figure.py", line 18,
in <module>
    from axes import Axes, SubplotBase, subplot_class_factory
  File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 14, in
<module>
    import matplotlib.axis as maxis
  File "C:\Python26\lib\site-packages\matplotlib\axis.py", line 12, in
<module>
    import matplotlib.patches as mpatches
  File "C:\Python26\lib\site-packages\matplotlib\patches.py", line
1574, in <module>
    class BoxStyle(_Style):
  File "C:\Python26\lib\site-packages\matplotlib\patches.py", line
2027, in BoxStyle
    {"AvailableBoxstyles": _pprint_styles(_style_list)}
  File "C:\Python26\lib\site-packages\matplotlib\patches.py", line
1502, in _pprint_styles
    import inspect
  File "C:\Python26\lib\inspect.py", line 37, in <module>
    import dis
  File "C:\Users\Qian Xin\Documents\My Dropbox\MSN\gitPlace\py\diagram
\dis.py", line 8, in <module>
    import matplotlib.pyplot as plt
AttributeError: 'module' object has no attribute 'pyplot'


Qian Xin@QianXinT41 /cygdrive/c.../py/diagram
$ /c/Python26/pythonw.exe draw.py

Qian Xin@QianXinT41 /cygdrive/c.../py/diagram
$ cat draw.opy
cat: draw.opy: No such file or directory

Qian Xin@QianXinT41 /cygdrive/c...py/diagram
$ cat draw.py
import numpy as np
import matplotlib.pyplot as plt


More information about the SciPy-User mailing list