Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

ImportError: No module named caffe2.python #2461

Closed
ptzheng opened this issue Mar 28, 2018 · 5 comments
Closed

ImportError: No module named caffe2.python #2461

ptzheng opened this issue Mar 28, 2018 · 5 comments

Comments

@ptzheng
Copy link

ptzheng commented Mar 28, 2018

I have installed caffe2 with build from source. But when I try to see see if my Caffe2 installation was successful, it failed. I used python -c 'from caffe2.python import core' to find the reason, and it showed:
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named caffe2.python

I have searched the problem in google and read https://caffe2.ai/docs/faq.html#why-do-i-get-import-errors-in-python-when-i-try-to-use-caffe2, but I am still confused about the problem.
I installed python by sudo apt-get python-dev at first and I installed anaconda later. The result of which python is /home/ptzheng/anaconda2/bin/python . The python information is:
Python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
However, I didn't use anaconda to install caffe2. When I check the directory of python, I am sure that my caffe2 was installed in the /usr/locol one, but not in the anaconda one.
I think if it is a environment variable problem. How can I solve it?Can anyone give me some advices? Please instruct me as detailed as possible. Thanks.

System Information:Ubuntu 14.04

@ptzheng ptzheng closed this as completed Mar 28, 2018
@wdgj-xy
Copy link

wdgj-xy commented Apr 22, 2018

hi!
I have the same problem as ptzheng!

@youngxiao
Copy link

@ptzheng I met the same problem with you. I am still struggling on it. Do you solve it?

@bigfly1994
Copy link

Hi!
I met the same problem with you. Do you solve it?

@nazlitemur
Copy link

Any solution ? I have the same problem.

@lianuo
Copy link

lianuo commented Jun 20, 2018

same problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants