00-python-常用命令

1. pip 加速命令

pip install --index-url https://pypi.douban.com/simple

或者

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple

2. conda加速命令

# 换用清华conda镜像 
conda config --prepend channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 
 # 也换用科大conda镜像 
conda config --prepend channels http://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes 
cat ~/.condarc #查看文件内容有无国内源信息,若有,则成功

#### 3.添加python 路径

export PYTHONPATH=/home/ye/setup/caffe-master/python:$PYTHONPATH

4 python 主函数头

if __name__ == '__main__':
    main()

猜你喜欢

转载自www.cnblogs.com/yeran/p/10494585.html