Discussions>Install caffe2 with python3>

Install caffe2 with python3

I'm trying to install caffe2, but can't find a proper way to do it with python3. I always get

ImportError: No module named caffe2

There is not a prebuilt version and pip does not work for it. I don't want to use conda. What is the right way to install caffe2 with python3?

2 votesLP262.00
1 Answers

You can build it from source, by downloading the scripts from the repositiry of pytorch, cause now it's a part of pytorch repository. https://caffe2.ai/docs/getting-started.html?&platform=mac&configuration=compile

Follow all steps to install and build the project and make sure you updated library path for your python, like

export PYTHONPATH=$PYTHONPATH:/path/pytorch/build

You can put this in your bash profile as well to make it globally for all sessions. The important part is /pytorch/build contains caffe2 folder and built libraries of caffe2 are stored there.

Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?