virtualenv 下安裝caffe教程

來源:互聯網
上載者:User

標籤:

 1.首先安裝依賴環境,

% sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler libatlas-base-dev% sudo apt-get install --no-install-recommends libboost-all-dev% sudo apt-get install python-dev python-pip python-numpy gfortran

2.然後建立 virtual --system-site-packages caffe-env,執行 source bin/activate,

3.運行 for req in $(cat requirements.txt); do pip install $req; done 安裝python需求環境

4.進入caffe檔案夾,修改Makefile.config,將PYTHON_INCLUDE和PYTHON_LIB 修改為caffe-env中的路徑

5.並修改環境變數:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/caffe/build/lib # contains libcaffe.so$ export PYTHONPATH=$PYTHONPATH:/path/to/caffe/python
6.然後 make -j8| make test -j8 | make runtest


virtualenv 下安裝caffe教程

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.