0

I am using python3.4.1 in win7 And I wana use matplotlib. but this error code has occured. Could you help me?

>>> text4.dispersion_plot(["citizens", "democracy", "freedom", "duties", "America"])

Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\nltk\draw\dispersion.py", line 25, in dispersion_plot

    import pylab

  File "C:\Python34\lib\site-packages\pylab.py", line 1, in <module>

    from matplotlib.pylab import *

  File "C:\Python34\lib\site-packages\matplotlib\__init__.py", line 105, in <module>

    import six

ImportError: No module named 'six'



During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "<pyshell#5>", line 1, in <module>

    text4.dispersion_plot(["citizens", "democracy", "freedom", "duties", "America"])

  File "C:\Python34\lib\site-packages\nltk\text.py", line 445, in dispersion_plot


    dispersion_plot(self, words)

  File "C:\Python34\lib\site-packages\nltk\draw\dispersion.py", line 27, in dispersion_plot

    raise ValueError('The plot function requires the matplotlib package (aka pylab).'

ValueError: The plot function requires the matplotlib package (aka pylab).See 

http://matplotlib.sourceforge.net/
>>> 
3
  • 1
    do you have matplotlib and/or six installed? How did you install them?
    – MattDMo
    Sep 30, 2014 at 5:20
  • Oh sorry!The problem was already solved! I installed the numpy and matplotlib in python3.4 and [import numpy]and[import matplotlib],so they work as neat.
    – noob
    Oct 16, 2014 at 12:30
  • I'm very sorry my answer is too late and very glad to get your kindness for this noob.Looking back this question, it is so bad and poor! I must apologize and gratitude to you.
    – noob
    Oct 16, 2014 at 12:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.