How can I upgrade NumPy?

后端 未结 12 2080
太阳男子
太阳男子 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:51

    After installing pytorch, I got a similar error when I used:

    import torch
    

    Removing NumPy didn't help (I actually renamed NumPy, so I reverted back after it didn't work). The following commands worked for me:

    sudo pip install numpy --upgrade
    sudo easy_install numpy
    

提交回复
热议问题