facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

Use Caffe2 in PyCharm on MacOS Sierra #436

Open emillion92 opened 7 years ago

emillion92 commented 7 years ago

Hello,

I got Caffe2 running in terminal, but I also want to use it in Caffe2 for debugging. When I want to import caffe2: ImportError: No module named caffe2 I don't know how to do this. Can anybody help?

Thanks.

vingovan commented 7 years ago

@emillion92 : you go into Preferences -> Project Interpreter. You can add third party lib.

emillion92 commented 7 years ago

Thank you for the answer. So I added the path where I built caffe2 into. Inside this root folder, there is the "libCaffe2_CPU.dylib" and there is also a folder with name "python". I added both.

Paths: /User/username/caffe2/ /User/username/caffe2/python

Unfortunately, it still can not find the caffe2 module.

vingovan commented 7 years ago

@emillion92 do you check external libraries in pycharm? I think you need to add your root folder to pycharm. add path: /User/username/ to pycharm -> use: from caffe2.python from core