zoukankan      html  css  js  c++  java
  • ubuntu+anaconda

    1、下载anaconda

    查看ubuntu是32位还是64位

    命令:

     uname -m

    如果显示i686,你安装了32位操作系统

    如果显示 x86_64,你安装了64位操作系统

     uname -a   查看更多内容
    

      

    2、安装

    bash  Anaconda2-4.2.0-Linux-x86_64.sh

    一路默认,然后配置环境

    sudo gedit ~/.bashrc
    export PATH="/home/nxp/anaconda2/bin:$PATH"  anaconda安装
    source ~/.bashrc

    3、验证

    conda list

    没有错误,则配置好了。

     换源,下载速度加快

    pip

    win下文件路径:C:Users你的用户名pippip.ini

    linux下文件路径:~/.pip/pip.conf

    内容:

    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    [install]
    trusted-host=pypi.tuna.tsinghua.edu.cn

    conda

    命令行下两条命令即可

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    
    conda config --set show_channel_urls yes



    创建环境
    conda create -n testcaffe python=2.7

    进入环境

    source activate testcaffe

    退出环境

    source deactivate

    下载caffe

    添加anaconda的python路径,注释掉系统本身自带的python路径。

    注释掉系统目录

    #PYTHON_INCLUDE := /usr/include/python2.7
    #/usr/lib/python2.7/dist-packages/numpy/core/include

    打开Anaconda目录
    # Anaconda Python distribution is quite popular. Include path:
    # Verify anaconda location, sometimes it's in root.
    ANACONDA_HOME := $(HOME)/anaconda2
    PYTHON_INCLUDE := $(ANACONDA_HOME)/include
    $(ANACONDA_HOME)/include/python2.7
    $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include

    # Uncomment to use Python 3 (default is Python 2)
    # PYTHON_LIBRARIES := boost_python3 python3.5m
    # PYTHON_INCLUDE := /usr/include/python3.5m
    # /usr/lib/python3.5/dist-packages/numpy/core/include

    # We need to be able to find libpythonX.X.so or .dylib.
    #PYTHON_LIB := /usr/lib
    PYTHON_LIB := $(ANACONDA_HOME)/lib

    看看PYTHONPATH变量,把当前caffe中python路径 加到~/.bashrc中

    编译caffe
    make all -j8
    make pycaffe make test
    -j8 make runtest -j8

    也许你在编译runtest的时候,会报这样的错误:

    .build_release/test/test_all.testbin: error while loading shared libraries: libhdf5.so.10: cannot open shared object file: No such file or directory

    进入/usr/lib/x86_64-linux-gnu看一下,你的libhdf5.so.x中的那个x是多少,比如我的是libhdf5.so.7

    # cd /usr/lib/x86_64-linux-gnu
    # sudo ln -s libhdf5.so.7 libhdf5.so.10
    # sudo ln -s libhdf5_hl.so.7 libhdf5_hl.so.10
    # sudo ldconfig
     
    安装protobuf
    conda install protobuf

    运行

    jupyter notebook

    终端直接运行jupyter notebook
     
  • 相关阅读:
    MSSQL '20210806'转换成'2021-08-06'
    cxgrid 列内容居中显示
    CXGRID 导出EXCEL
    study PostgreSQL【3-get数据库中all表以及表的字段信息】
    study PostgreSQL【2-FireDAC连接PostgreSQL】
    高格-销售发票勾稽销售出货的赠品处理【14】
    study PostgreSQL【1-PostgreSQL对象】
    高格-负库存导致系统异常的处理【13】
    study Rust-9【组织管理】
    基础资料属性不符合目标组织要求:物料.允许库存,物料.来料检验
  • 原文地址:https://www.cnblogs.com/crazybird123/p/9469148.html
Copyright © 2011-2022 走看看