You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
git clone https://github.com/caffe2/caffe2.git
cd caffe2
mkdir build
cd build
cmake .. -DPYTHON_EXECUTABLE=/anaconda3/bin/python -DPYTHON_LIBRARY=/anaconda3/lib/libpython3.6m.so -DPYTHON_INCLUDE_DIR=~/anaconda3/include/python3.6m
make -j4
export PYTHONPATH=pwd
Fix "CRITICAL:root:Cannot load caffe2.python. Error: ~/anaconda3/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ~/Data/caffe2/build/caffe2/python/caffe2_pybind11_state.so)"
Fix "CRITICAL:root:Cannot load caffe2.python. Error: ~/anaconda3/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by ~/Data/caffe2/build/caffe2/libCaffe2_CPU.so)"
Here is my procedures of building pytorch + caffe2 + ONNX in Ubuntu 17.04
for http://pytorch.org/tutorials/advanced/super_resolution_with_caffe2.html
Install python
./Anaconda3-4.4.0-Linux-x86_64.sh
export PATH=~/anaconda3/bin:$PATH
conda install -c statiskit python-dev
conda install -c conda-forge pybind11
conda install future
Build, install pytorch (torch.onnx missed)
#conda install pytorch torchvision -c soumith
git clone --recursive https://github.com/pytorch/pytorch.git
cd pytorch
python setup.py install
Build, install ONNX
git clone https://github.com/onnx/onnx.git
cd onnx
python setup.py install
Build, install ONNX-CAFFE2
git clone https://github.com/onnx/onnx-caffe2.git
cd onnx-caffe2
python setup.py install
Build caffe2 with python3
git clone https://github.com/caffe2/caffe2.git
cd caffe2
mkdir build
cd build
cmake .. -DPYTHON_EXECUTABLE=
/anaconda3/bin/python -DPYTHON_LIBRARY=/anaconda3/lib/libpython3.6m.so -DPYTHON_INCLUDE_DIR=~/anaconda3/include/python3.6mmake -j4
export PYTHONPATH=
pwd
Fix "CRITICAL:root:Cannot load caffe2.python. Error: ~/anaconda3/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ~/Data/caffe2/build/caffe2/python/caffe2_pybind11_state.so)"
rm ~/anaconda3/lib/libstdc++.so ~/anaconda3/lib/libstdc++.so.6
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 ~/anaconda3/lib/libstdc++.so
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 ~/anaconda3/lib/libstdc++.so.6
Fix "CRITICAL:root:Cannot load caffe2.python. Error: ~/anaconda3/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by ~/Data/caffe2/build/caffe2/libCaffe2_CPU.so)"
rm ~/anaconda3/lib/libgomp.so ~/anaconda3/lib/libgomp.so.1
ln -s /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 ~/anaconda3/lib/libgomp.so
ln -s /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 ~/anaconda3/lib/libgomp.so.1
The text was updated successfully, but these errors were encountered: