caffe 를 컴 파일 할 때 protobuf 버 전의 다른 문제

1461 단어 linux딥 러 닝
먼저 caffe 를 설치 할 때 Python 버 전 은 시스템 이 자체 적 으로 가지 고 있 는 Python 2.7 또는 Python 3.5 를 선택 할 수 있 으 며,anaconda 의 Python 버 전 을 사용 할 수도 있 습 니 다.해당 하 는 Makefile.config 의 Python 경로 에 대응 하 는 변경 사항 을 사용 할 수도 있 습 니 다.
protobuf 를 설치 하 는 방법 도 여러 가지 가 있 습 니 다.
sudo apt-get install libprotobuf-dev protobuf-compiler  #Linux      
sudo pip install google protocol  #python2.7     
sudo pip3 install google protocol  #python3.5     
conda install protobuf  #anaconda     

시스템 에 설 치 된 protobuf 보기:
whereis protoc  #          protobuf
which protoc  #       protobuf
protoc --version  #       protobuf   
sudo protoc --version  #     protobuf   

그래서 caffe 를 컴 파일 하고 있 습 니 다.Google 이나 protobuf 에 대해 잘못 알 렸 다 면:
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is  
error: #error incompatible with your Protocol Buffer headers. Please update  

4.567913.문 제 는 시스템 에 여러 개의 protobuf 버 전이 존재 하 는데 시스템 의 기본 버 전 은 caffe 를 컴 파일 하 는 요 구 를 만족 시 키 지 못 합 니 다.이때 우 리 는 Makefile 파일 의 이 두 줄 을 수정 하여 자신 이 원 하 는 버 전 디 렉 터 리 로 바 꿀 수 있 습 니 다.예 를 들 어 시스템 을 사용 하 는 것 으로 바 꿀 수 있 습 니 다.
4.567913.
ImportError: No module named 'google'

좋은 웹페이지 즐겨찾기