matplotlib的坑

链接

使用matplotlib时,提示不能imporrt _name thread,原因是因为dateutil对于python的两个版本有不同的对应。使用easy_install或者pip直接安装最新的datetutil目前是2.2版本,由于我本地还是python 2,所以import出错。
将dateutil卸载后,重新指定版本就可以安装适用于python 2的dateutil了,然后就可以顺利的使用matplotlible

1.5以下用于python2,以上则对应python3

sudo pip uninstall python-dateutil
sudo pip install python-dateutil==1.5(若是python3,请安装2.2或者更新)
    原文作者:朱小虎XiaohuZhu
    原文地址: https://www.jianshu.com/p/33b9cfc5fc37
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞