[Tutor] Finding Matplotlib somewhere ADDING ADDITIONAL INFORMATION

Adam Eyring adameyring at gmail.com
Sun Nov 8 19:35:37 EST 2020


I tried
import matplotlib.dates
on my Win10 installation of Python 3.7.6 and it worked, though I don't have
a use for .dates. I normally use
import matplotlib.pyplot as plt
for my projects. I wonder if you should uninstall Python 2 and do a clean
re-install of Python 3 to see if that makes a difference. By looking at the
errors that come up when running bioyear.py, you can make adjustments to
work in Python 3, but I would expect it to be backwards compatible (I'm not
an expert on that).

AME




On Sun, Nov 8, 2020 at 6:36 PM Alan Gauld via Tutor <tutor at python.org>
wrote:

> On 08/11/2020 22:31, Ken Green wrote:
>
> > Matplotlib was installed by pip and apt-get and verified by pip3 list.
> > When typing each of the following lines in python 3 shell command line,
> > no error were noted.
> >
> > from datetime import date
> > import matplotlib.dates
>
> > Traceback (most recent call last):
> >    File "bioyear.py", line 24, in <module>
> >      import matplotlib.dates
> > ImportError: No module named matplotlib.dates
> >
> > It seems not to find matplotlib anywhere
>
> It says it can't find matplotlib.dates, which is not the same
> as saying it can't find matplotlib. I'd check that first
>
> >>> import matplotlib
>
> Does that work?
>
> Are you sure there is a matplotlib.dates in the Python 3 version
> of matplotlib?
>
> Also there is a dedicated support community for SciPy, of which
> matplotlib is part. You might get more experienced answers there.
>
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list