[英]Python 3 installed and unable to install MySQLdb due to 2.7 deprecation error
[英]OpenCV install: deprecation error
我想在 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
如果您在机器上同时使用 Py2.7 和 3.5,请通过执行python3 -m pip install numpy -I
或python2 -m pip install numpy -I
来确保安装了正确版本的python2 -m pip install numpy -I
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.