opencv3.1 卸载:
$ sudo make uninstall
``` $ cd ..
````$ rm -r build
$ 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*
$ cd /usr
$ find . -name "*opencv*" | xargs sudo rm -rf
1. $ sudo make uninstall
2. $ cd ..
3. $ sudo rm -r build
4. $ 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*
opencv3.1 安装环境配置
#加入动态链接库
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
sudo gedit /etc/profile #在最后加入两行
#若无gedit命令,sudo apt-get install gedit
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
$ sudo vim /etc/ld.so.conf
将下面的目录 /usr/local/lib 添加到文件中
$ sudo ldconfig -v
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
使用以下命令查看pkg-config配置信息: pkg-config --libs opencv
cuda8.0安装环境配置
安装完毕后,再声明一下环境变量,并将其写入到 ~/.bashrc 的尾部:
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
然后设置环境变量和动态链接库,在命令行输入:
sudo gedit /etc/profile
在打开的文件末尾加入:
export PATH=/usr/local/cuda/bin:$PATH
保存之后,创建链接文件:
sudo gedit /etc/ld.so.conf.d/cuda.conf
在打开的文件中添加如下语句:
/usr/local/cuda/lib64
然后执行
sudo ldconfig
caffe安装环境配置
cd caffe/python
for req in $(cat requirements.txt); do pip install $req; done
jupyter 安装环境配置
比如2.7.x版本的不能安装IPython的最新版本,会提示有错误
有两种解决方法,第一种是从github下载5.X的源代码编译安装,另一种是指定ipython的版本【推荐】。先介绍第一种方式,源代码编译安装【来自于github官方指导】
sudo pip install ipython==5.3.0