Python OpenCV安装:弃用错误

Python OpenCV安装:弃用错误,python,numpy,opencv,installation,Python,Numpy,Opencv,Installation,我想在python中使用opencv,但我认为我的numpy版本有问题。 如何确保opencv使用正确的numpy版本 是的 我收到了这个消息 Installing collected packages: numpy, opencv-python Found existing installation: numpy 1.8.0rc1 DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecate

我想在python中使用opencv,但我认为我的numpy版本有问题。 如何确保opencv使用正确的numpy版本

是的

我收到了这个消息

Installing collected packages: numpy, opencv-python
Found existing installation: numpy 1.8.0rc1
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling numpy-1.8.0rc1:
  Successfully uninstalled numpy-1.8.0rc1
Successfully installed numpy-1.14.5 opencv-python-3.4.1.15
现在当我尝试

import cv2
我明白了

ImportError: numpy.core.multiarray failed to import
我还更新了我的numpy版本

sudo pip install -U numpy

如果您在计算机上同时使用Py2.7和3.5,请通过执行python3-m pip install numpy-I
或者
python2-m pip安装numpy-I

对,我用python3重新安装了numpy和opencv,现在我可以导入cv2了。谢谢
sudo pip install -U numpy