【发布时间】:2018-06-17 20:58:52
【问题描述】:
我想在 python 中使用 opencv,但我认为我的 numpy 版本有问题。 如何确保 opencv 使用正确的 numpy 版本?
我做到了
sudo pip install opencv-python
我收到了这条消息
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
【问题讨论】:
标签: python numpy opencv installation