How can I upgrade NumPy?

后端 未结 12 2074
太阳男子
太阳男子 2020-12-01 04:31

When I installed OpenCV using Homebrew (brew), I got this problem whenever I run this command to test python -c \"import cv2\":

Run         


        
12条回答
  •  星月不相逢
    2020-12-01 04:35

    Because we have two NumPy installations in the system. One is installed by Homebrew and the second is installed by pip. So in order to solve the problem, we need to delete one and use the default NumPy install by OpenCV.

    Check the path,

    import numpy
    print numpy.__path__
    

    and manually delete it using rm.

提交回复
热议问题