Cannot import matplotlib after installing pyparsing, dateuil, six and numpy

前端 未结 3 744
青春惊慌失措
青春惊慌失措 2021-01-23 10:47

As title, I cannot import matplotlib...

And here is the code:

import cv2
import numpy as np
from matplotlib import pyplot as plt

img = cv2.imread(\'pict         


        
相关标签:
3条回答
  • 2021-01-23 11:16

    The error has occurred due to the recent version of pyparsing being in conflict with matplotlib, which pip has picked up.

    The workaround would be to: pip install pyparsing==2.1.1 followed by pip install matplotlib

    0 讨论(0)
  • 2021-01-23 11:19

    It's a pyparsing issue:

    https://github.com/matplotlib/matplotlib/issues/6399

    Just wait for fix. Or you can upgrade python to 3.5

    0 讨论(0)
  • 2021-01-23 11:40

    I had install the newest pyparsing(2.1.3) and this issue is fixed !

    Download page: https://pypi.python.org/pypi/pyparsing/2.1.3

    0 讨论(0)
提交回复
热议问题