win10+Anconda4.2.0(python3.5.2)+tensorflow1.0.1+opencv3.2.0环境配置
在win10下配置上述环境。
- 安装Anconda3-4.2.0,集成python3.5.2。全程一键安装,遇到需要添加环境变量的,允许即可。点击这里下载,大概391.4M
验证:
C:\Users\mayax\Downloads>python
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
- 安装tensorflow。
用pip安装tensorflow,这里支持version1.0.1。
C:\Users\mayax\Downloads>pip install tensorflow
Collecting tensorflow
Using cached tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
Requirement already satisfied: protobuf>=3.1.0 in d:\program files (x86)\anaconda\lib\site-packages (from tensorflow)
Requirement already satisfied: wheel>=0.26 in d:\program files (x86)\anaconda\lib\site-packages (from tensorflow)
Requirement already satisfied: numpy>=1.11.0 in d:\program files (x86)\anaconda\lib\site-packages (from tensorflow)
Requirement already satisfied: six>=1.10.0 in d:\program files (x86)\anaconda\lib\site-packages (from tensorflow)
Requirement already satisfied: setuptools in d:\program files (x86)\anaconda\lib\site-packages (from protobuf>=3.1.0->tensorflow)
Requirement already satisfied: packaging>=16.8 in d:\program files (x86)\anaconda\lib\site-packages (from setuptools->protobuf>=3.1.0->tensorflow)
Requirement already satisfied: appdirs>=1.4.0 in d:\program files (x86)\anaconda\lib\site-packages (from setuptools->protobuf>=3.1.0->tensorflow)
Requirement already satisfied: pyparsing in d:\program files (x86)\anaconda\lib\site-packages (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorflow)
Installing collected packages: tensorflow
Successfully installed tensorflow-1.0.1
C:\Users\mayax\Downloads>python
>>> tensorflow.__version__
'1.0.1'
>>>
3.安装opencv3.2.0
首先,下载支持python3.5的wheel文件,[下载链接],(http://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo)
注意,需要选择支持python3.5的版本,我选择的是opencv_python-3.2.0-cp35-cp35m-win_amd64.whl
然后,在命令行下切换到改文件的目录:
pip install opencv_python-3.2.0-cp35-cp35m-win_amd64.whl
提示安装完成之后,验证:
>>> import cv2 as cv
>>> cv.__version__
'3.2.0'
>>>
在ubuntu 16.04下可以配置opencv3.1.0
具体:在安装anaconda后:
anaconda search -t conda opencv
Using Anaconda API: https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
Name | Version | Package Types | Platforms
------------------------- | ------ | --------------- | ---------------
???/opencv | 2.4.7 | conda | win-64
: http://opencv.org/
Changxu/opencv3 | 3.1.0_dev | conda | linux-64
Definiter/opencv | 2.4.12 | conda | linux-64
FlyEM/opencv | 2.4.10.1 | conda | linux-64, osx-64
: Open source computer vision C++ library
JaimeIvanCervantes/opencv | 2.4.9.99 | conda | linux-64
RahulJain/opencv | 2.4.12 | conda | linux-64, win-64, osx-64
adittam1/opencv3 | 3.1.0 | conda | win-64
anaconda/opencv | 3.1.0 | conda | linux-64, linux-32, osx-64
andywocky/opencv | 2.4.9 | conda | osx-64
asmeurer/opencv | 2.4.9 | conda | osx-64
bgreen-litl/opencv | 2.4.9 | conda | osx-64
bwsprague/opencv | 2.4.9.1 | conda | osx-64
cfobel/opencv-helpers | 0.1.post1 | conda | win-32
clg_boar/opencv3 | 3.0.0 | conda | linux-64, win-64
clinicalgraphics/opencv | | conda | linux-64, win-32, win-64, linux-32, osx-64
conda-forge/opencv | 3.2.0 | conda | linux-64, win-32, win-64, osx-64
csfoo/opencv | 2.4.10 | conda | linux-64
daleydeng/opencv | 3.2.0 | conda | linux-64, win-64
derickl/opencv | 3.2.0 | conda | osx-64
dhaneshr/opencv | 2.4.13 | conda | linux-64
erik/opencv | 2.4.9 | conda | linux-64, osx-64
hadim/opencv | 3.0.0 | conda | linux-64
hovren/opencv | 3.0.0 | conda | linux-64
hyperion/opencv | 2.4.10.1 | conda | linux-64
: Llibrary for computer vision
ijstokes/opencv | 2.4.11 | conda | osx-64
jaggi/opencv3 | 3.1.0 | conda | linux-64
janc/opencv | 2.4.12 | conda | osx-64
: with ffmpeg
janc/opencv3 | 3.1.0 | conda | osx-64
: with ffmpeg and opencl
jjh_cio_testing/opencv | 3.1.0 | conda | linux-64
jjh_ppc64le/opencv | 3.1.0 | conda | linux-ppc64le
jjhelmus/opencv | 2.4.12 | conda | osx-64
: http://opencv.org/
jlaura/OpenCV3 | 3.0.0 | conda | linux-64, osx-64
: OpenCV 3.0.0 with the optional contrib modules
jmargeta/opencv | 2.4.7 | conda | win-64
: http://opencv.org/
joschka_zj/opencv | 2.4.11 | conda | win-64
: OpenCV library
jqscali/opencv3 | 3.0.0 | conda | linux-64
kangyounglee87/opencv | 2.4.11 | conda | linux-64
kichanl/opencv3 | 3.1.0 | conda | linux-64
lbernard/opencv3 | 3.1.0 | conda | linux-64
leuduan/opencv | 2.4.11 | conda | linux-64
lifefilm/opencv | 2.4.13 | conda | linux-64
litl-rnd/opencv | 2.4.9 | conda | osx-64
loopbio/opencv | 3.2.0 | conda | linux-64
loopbio/opencv-cuda-feature | 8.0 | conda | linux-64
loopbio/opencv-turbo | 3.2.0 | conda | linux-64
loopbio/opencv-turbo-cuda | 3.2.0_8.0 | conda | linux-64
loopbio/opencv-turbo-feature | 3.2.0 | conda | linux-64
manfred_diaz/opencv3 | 3.2.0 | conda | linux-64
memex/opencv | 3.0.0 | conda | linux-64, win-64, osx-64
menpo/opencv | 2.4.11 | conda | linux-64, win-32, win-64, linux-32, osx-64
menpo/opencv3 | 3.2.0 | conda | linux-64, win-32, win-64, osx-64
miovision/opencv | 3.1.0 | conda | linux-64, osx-64
msarahan/opencv | 3.1.0 | conda | linux-64, win-32, win-64, linux-32, osx-64
onlyjus/opencv | 2.4.7 | conda | win-64
: http://opencv.org/
patricksnape/opencv | 2.4.11 | conda | linux-64, osx-64
patricksnape/opencv-gpu | 2.4.9.1 | conda | linux-64
phhuang/opencv | 2.4.10 | conda | linux-64
: OpenCV compiled with ffmpeg.
pluraldatum/opencv3 | 3.2.0 | conda | linux-64, osx-64
poppy-project/opencv3 | 3.1.0 | conda | linux-armv7l
prkrekel/opencv | 2.4.9.1 | conda | linux-64, win-32, win-64, linux-32, osx-64
rdonnelly/opencv | 3.2.0 | conda | win-64, osx-64
rsignell/opencv-python | 2.4.9 | conda | win-32
salilab/opencv-nopython | 2.4.9 | conda | linux-64, win-32, win-64, linux-32, osx-64
: opencv package built without Python (for Python 3)
santiavenda2/opencv | 2016.05.08.2120 | conda, env | linux-32
shariqiqbal2810/opencv | 2.4.11 | conda | osx-64
shiquanwang/opencv | 3.0.0beta_28_g3234860 | conda | linux-64
sotera/opencv | 2.4.11 | conda | linux-64
sotte/opencv_gtk | 2.4.9 | conda | linux-64
stuarteberg/opencv | | conda | linux-64
: Open source computer vision C++ library
test_org_002/opencv | 3.1.0 | conda |
thedlade/opencv3 | 3.2.0 | conda | linux-64
tianzhou2011/opencv3 | 3.1.0 | conda | linux-64
timurbagautdinov/opencv | 2.4.11 | conda | linux-64
timurbagautdinov/opencv3 | 3.1.0 | conda | linux-64
tofighi/opencv3 | 3.1.0 | conda | osx-64
trax/numpy_for_opencv | 1.9.3 | conda | linux-64
trax/opencv3 | 3.0.0 | conda | linux-64
trax/opencv3_gtk | 3.0.0 | conda | linux-64
trax/opencv_gtk_numpy_1_8 | 2.4.10 | conda | linux-64
trung/opencv | 2.4.11 | conda | linux-64, osx-64
trung/opencv3 | 3.1.0 | conda | linux-64, osx-64
tsc/opencv | 2.4.9 | conda | osx-64
valgur/opencv | 3.1.0 | conda | linux-64
ver228/opencv | 2.4.9 | conda | osx-64
ver228/opencv3 | 3.2.0 | conda | linux-64, osx-64, win-64
wheeler-microfluidics/opencv-helpers | 0.1.post1 | conda | win-32
wheeler-microfluidics/opencv-python | 3.1.0.3 | conda | win-32
willyd/opencv | 3.1.0.vc12.cuda75 | conda | win-64
zym1010/opencv | 2.4.13 | conda | linux-64
: Computer vision and machine learning software library.
Found 88 packages
选择loopbio/opencv
conda install --channel https://conda.anaconda.org/loopbio opencv
不过这个版本无法启用gpu需要的时候再重新配置吧。