ubutnu16.04配置深度学习环境问题(填坑)
程序员文章站
2024-02-19 13:53:40
...
ImportError: /home/jason/anaconda2/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.21’ not found (required by /home/jason/anaconda2/lib/python2.7/site-packages/cv2.so)
打开终端输入命令:pip install opencv-python
ImportError: /home/kzl/anaconda2/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.21’ not found (required by caffe/_caffe.so)
conda install libgcc
ImportError: No module named google.protobuf.internal
要使用之前先到code.google.com上搜索protocol buffer,下载到本地,解压后依次执行:
cd protobuf-2.6.1/python
python setup.py build
python setup.py install
make [./build_release/lib/libcaffe.so.1.0.0]Error1
sudo apt-get install libopenblas-dev libapack-dev libatlas-base-dev
make :**[runtest ] Aborted core dumped
make pycaffe
gedit ~/.bashrc
将caffe中的python路径export下面
source ~/.bashrc
make: ** [./build_release/examples/mnist/convert_mnist-data.bin] Error1
cd /etc/ld.so.conf.d
sudo ldconfig -v
opencv安装出错,可以先去/anaconda2/lib/python2.7/site-packages/下面看一下是否有一个cv2文件夹,若有删除,看是否恢复,若还出错,重新安装opencv
卸载方法:
make uninstall
cd ..
sudo rm -r build
sudo rm -r /usr/local/include/opencv2 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv2 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv*
可能会出错,一般来说没问题
ImportError :libcudnn.so.6:cannot open shared object file:No such file or dirctory
重新编译caffe
make clean
make -j16 #j后面数字根据自己的电脑确定
make pycafffe
上一篇: tomcat相关配置
下一篇: Shell基础语法整理