Jun 07, 2016 One of the easiest ways to install the CAFFE framework on windows!
Tested on Ubuntu 14.04.
![Caffe Caffe](http://www.ics.uci.edu/~pattis/common/handouts/pythoneclipsejava/images/python/pythonsetup.jpg)
Setting up a new python environment using pyenv
Install desired version of python 3 (e.g. 3.5.1). Make sure to use the --enable-shared
flag to generate python shared libraries, which will later be linked to.
Go to a directory where we will do all the following operations. Set that directory to use the version of python that was just installed. Play free online farm games without downloading.
Get pip
for the new installation of python.
Installing boost
We need to build boost from source since the one from the package manager doesn't support python 3.5 (as of now). Download one of the recent versions of boost from here (I used boost 1.60.0).
If you are using CUDA, you might run into a compiler error involving nvcc
, in which case this patch might solve it.
Build and install boost, telling it to use the python from pyenv.
Installing caffe
The instructions are mostly the same as the official installation instructions except for a few modifications specified below.
First, install the usual system dependencies as described in here.
Install Caffe On Windows
Then, install the usual python dependecies using pip
, but first update the requirements.txt
file to use protobuf 3.0 alpha. Replace the protobuf line with this one:
Install all the requirements as usual:
When using cmake
, make sure to specify the python from pyenv that you want to use, e.g.
Thanks guys !
The main problem is that caffe don't really give instructions for newb people(who use windows, and don't know what is make or using command line like in linux).. for example newb question :
'I heard Caffe is python framework for AI why we should compile it, it is python?'
Or at least caffe could say that we should compile and only then copy to site-packages or upload the pre -compiled version..
Python Import Caffe
any way I Found solution , so before copying the python/caffe folder to site-packages ,
use this repository for simple compile and build caffe for windows :
Install Caffe Python3 Windows
Just run 'build_win.cmd' file with correct configurations, THIS SCRIPT WILL BUILD THE C++ PROJECTS(using cmake / ninja / visual studio cl.exe or whatever) AND WILL CREATE DLL FILES INSIDE 'python/caffe' folder ..sounds better no ? Windows 10 pro serial keys. .. Now you can copy this folder with the DLL's needed for python to run caffe into 'site-packages' folder where Anaconda or Python installed in your windows , now you can test it by writing import caffe in python (: