在Ubuntu 16.04版本中安装Open CV及conda

以下安装方法基于ubuntu16.04,python3.5

Install OpenCV 3.4 in Python 3.5

python -m pip install opencv-python
root@imhqq-Lenovo-H5050:/home/imhqq/share/OpenCV3.4# python3.5 -m pip install opencv-python
Collecting opencv-python
  Downloading opencv_python-3.4.0.12-cp35-cp35m-manylinux1_x86_64.whl (24.9MB)
    40% |█████████████                   | 10.1MB 447kB/s eta 0:00:34
    100% |████████████████████████████████| 24.9MB 78kB/s
Requirement already satisfied: numpy>=1.11.1 in /usr/local/lib/python3.5/dist-packages (from opencv-python)
Installing collected packages: opencv-python
Successfully installed opencv-python-3.4.0.12
python3.5 -m pip install opencv-contrib-python
Requirement already satisfied: opencv-contrib-python in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: numpy>=1.11.1 in /usr/local/lib/python3.5/dist-packages (from opencv-contrib-python)
root@imhqq-Lenovo-H5050:/home/imhqq/share/OpenCV3.4#
 
  
conda安装参考下面这篇文档:
如何在Ubuntu 16.04上安装Anaconda Python发行版
http://www.yuanjiaocheng.net/article/null/84.html
 
  
root@imhqq-Lenovo-H5050:/home/imhqq/share/OpenCV3.4/conda# cd /tmp
root@imhqq-Lenovo-H5050:/tmp# curl -O https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
============tip:============
sublimtext3 如何安装package control
 
  

附:如何安装package control

通过快捷键ctrl+\``或者View > Show Console`菜单打开控制台,输入下面Python执行代码(适用于Python3.x解释器):

import urllib.request,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib.request.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')



$ cd opencv3$ mkdir build$ cd build$ cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/ local \ -D INSTALL_C_EXAMPLES=OFF \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ -D BUILD_EXAMPLES=ON ..

你可能感兴趣的:(在Ubuntu 16.04版本中安装Open CV及conda)