参考: VNect官方文档
环境:windows7,CPU,anaconda3
使用python虚拟环境
创建虚拟环境
conda create -n test2002b python=3.5
test2001为创建虚拟环境名称,python=3.5设置虚拟环境的python版本
conda启用虚拟环境
查看当前虚拟环境列表
conda env list
或
conda info -e
激活已创建的虚拟环境
conda activate test2002b
配置pycaffe
1. 配置win下的caffe环境
官网要求:
Requirements:
Visual Studio 2013 or 2015
Technically only the VS C/C++ compiler is required (cl.exe)
CMake 3.4 or higher (Visual Studio and Ninja generators are supported)
Optional Dependencies:
Python for the pycaffe interface. Anaconda Python 2.7 or 3.5 x64 (or Miniconda)
We assume that cmake.exe and python.exe are on your PATH.
我的环境是是vs2015, CMake3.16.0,Python3.5.5(test2002b)。
根据官网给出的配置编译步骤下载caffe包
F:\caffe> git clone https://github.com/BVLC/caffe.git
然后切换至下面的caffe路径,检查环境
F:\caffe> cd caffe
F:\caffe\caffe> git checkout windows
显示如下
随后更改配置选项
# line72
if NOT DEFINED MSVC_VERSION set MSVC_VERSION=14 # to use VS 2015
# line74
if NOT DEFINED WITH_NINJA set WITH_NINJA=0