环境搭建PTA_mask

ubuntu+pytorch+anaconda+package环境搭建PTA_mask

anaconda的安装:https://blog.csdn.net/lwplwf/article/details/79162470

创建一个Python3.7环境

#创建一个Python3.7环境
	conda create --name torch python=3.7
#激活pytorch环境
	conda activate torch
#退出环境
	deactivate torch

修改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镜像
conda config --prepend channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

要查看镜像源是否安装成功的话,建议终端中运行以下命令:

 conda config --set show_channel_urls yes

会生成一个~/.condarc文件,运行cat命令查看文件内容

cat ~/.condarc #查看
gedit ~/.condarc #修改

显示内容为
![在这里插入图片描述](https://img-blog.csdnimg.cn/20190404163616364.png

pytorch cpu版安装
在这里插入图片描述

#conda方式
# conda install pytorch-cpu torchvision-cpu
conda install pytorch torchvision cpuonly -c pytorch

package安装

#conda方式
	conda install numpy scipy matplotlib Pillow opencv
	

编译cmake时报错:

undefined reference to `TIFFIsTiled@LIBTIFF_4.0’

在这里插入图片描述
提示类似的信息:
网上说的是TIFF库发生了冲突,主要是anaconda 惹的祸。
通过运行以下命令,解决了。

conda remove libtiff
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值