anaconda安装Opencv报错:Could NOT find PythonLibs: Found unsuitable version "2.7.6",
2017-10-08 12:01
796 查看
机器上装了两个python,一个是默认的,一个是anaconda。安装opencv时就报错了:
-- Found PythonInterp: /home/deeplp/anaconda2/bin/python2 (found suitable version "2.7.12", minimum required is "2.0")
-- Could NOT find PythonLibs: Found unsuitable version "2.7.6", but required is exact version "2.7.12" (found /usr/lib/x86_64-linux-gnu/libpython2.7.so)
这个错有什么影响呢?影响就是 编译好的opencv没有cv2.so文件。这样python就不可以用了。
怎么解决:
方法一:修改cmake.list,指定 pythonlib的路径。无奈我cmake根底浅,改来改去没有解决问题。有解决了的大神欢迎告诉我啊。
方法二:修改bashrc文件,把path中的anaconda路径去掉。这样就会 PythonInterp 和 PythonLibs都是系统默认的python路径了。
然后编译opencv顺利。
编译好后,将bashrc改回来。
将 cv2.so 拷贝到/home/youname/anaconda2/lib/python2.7/site-packages
下面。
import cv2 成功。
-- Found PythonInterp: /home/deeplp/anaconda2/bin/python2 (found suitable version "2.7.12", minimum required is "2.0")
-- Could NOT find PythonLibs: Found unsuitable version "2.7.6", but required is exact version "2.7.12" (found /usr/lib/x86_64-linux-gnu/libpython2.7.so)
这个错有什么影响呢?影响就是 编译好的opencv没有cv2.so文件。这样python就不可以用了。
怎么解决:
方法一:修改cmake.list,指定 pythonlib的路径。无奈我cmake根底浅,改来改去没有解决问题。有解决了的大神欢迎告诉我啊。
方法二:修改bashrc文件,把path中的anaconda路径去掉。这样就会 PythonInterp 和 PythonLibs都是系统默认的python路径了。
然后编译opencv顺利。
编译好后,将bashrc改回来。
将 cv2.so 拷贝到/home/youname/anaconda2/lib/python2.7/site-packages
下面。
import cv2 成功。
相关文章推荐
- Python安装PIL遇到‘Could not find a version that satisfies the requirement PIL’
- python环境选择和安装,解决could not find a version that satisfies the requirement tensorflow
- OpenCV3.1 + Python2.7 error "DLL load failed: The specified module could not be found"
- hadoop 安装 Error: Could not find or load main class org.apache.hadoop.util.VersionInfo
- 安装11.2.0.3时,OUI的log报错:"OUI-10066:Not All The Dependencies For The Component ... Could Be Found"
- 解决安装MySQL-python出现的:Python version 2.7 required, which was not found in the registry
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- win 7 64位系统安装java jdk 遇到could not find the required version of the java 2 runtime environment 错误
- 安装 pywin32-218.win32-py2.7.exe 报错python version 2.7 required,which was not found in the registry解决方案
- 安装第三方模块时遇到Python version 2.7 required, which was not found
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- Tensorflow安装问题: Could not find a version that satisfies the requirement tensorflow
- 打不开Anaconda spyder:could not find or load the QT platform plugin "window in"简单解决方法
- glibc 安装( version `GLIBC_2.14' not found")
- 安装pywin32出现--Python version 3.3 required, which was not found in the registry
- DirectoryNotFoundException: Could not find a part of the path "……"
- Linux pip 安装模块时,一直黄字错误:Could not find a version that satisfies the requirement
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装J2EE的SDK报错:could not find the required version of the Java(TM)2 Runtime Environment in '(null)'的解决办法。