安装Anaconda及TensorflowWin10下Linux子系统中

Linux子系统中输入如下代码进入刚刚下载好的安装包的存放路径:

cd /mnt/[在win10中安装包的存放了路径]
1
进入路径后输入如下代码进行安装:

bash Anaconda3-2020.02-Linux-x86_64.sh #此处输入安装包的文件名
1
运行后如图所示:

此时便一路按Enter键,直到其中会出现两下次询问[yes|on]时,输入yes即可。
安装后需要添加到路径,步骤如下:

vim ~/.bashrc #打开配置文件
1
按“i”键进入插入模式,在打开的文件中最后一行加上:

export PATH=$PATH:/home/你的用户名/anaconda3/bin #用户名就是Linux的用户名
1
输入后按Esc键回到normal模式并输入:wq!退出。
最后输入如下代码即可完成Anaconda的安装:

source ~/.bashrc
1
出现如下形式即便是安装成功:


安装Tensorflow
输入如下代码查看系统中python的版本:

conda list
1
如图所示:

输入如下代码创建一个新的环境:

conda create -n tensorflow python=3.7.6 #其中tensorflow为环境名可以改成你喜欢的,python的版本是刚刚查到的版本
1
如下代码可查看已经创建好的环境:

扫描二维码关注公众号,回复: 11269287 查看本文章

conda info --env
1
接下来激活tensorflow环境:

activate tensorflow
1
激活成功环境后就可以安装tensorflow了,安装代码如下,我在最后加了豆瓣的镜像地址,这个地址我觉得下载速度还挺快的,用原来的源下载速度非常慢,甚至会慢到超时出现一片红的错误提示。

pip install tensorflow -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
1
至此tensorflow安装结束【撒花】
另pytorch的安装方法与tensorflow基本一致,只要将上文中的tensorflow替换成pytorch即可。
由于学习的需要要用到Linux系统,而且我的电脑还没有gpu,所以在Linux子系统下安装tensorflow就比较方便。
————————————————

www.cnblogs.com/lucongrui/articles/12963229.html
www.cnblogs.com/lucongrui/articles/12963222.html
www.cnblogs.com/lucongrui/articles/12963216.html
www.cnblogs.com/lucongrui/articles/12963208.html
www.cnblogs.com/lucongrui/articles/12963203.html
www.cnblogs.com/lucongrui/articles/12963198.html
www.cnblogs.com/lucongrui/articles/12963192.html
www.cnblogs.com/lucongrui/articles/12963188.html
www.cnblogs.com/lucongrui/articles/12963183.html
www.cnblogs.com/lucongrui/articles/12963175.html
www.cnblogs.com/lucongrui/articles/12963171.html
www.cnblogs.com/lucongrui/articles/12963163.html
www.cnblogs.com/lucongrui/articles/12963155.html
www.cnblogs.com/lucongrui/articles/12963147.html
www.cnblogs.com/lucongrui/articles/12963143.html
www.cnblogs.com/lucongrui/articles/12963141.html
www.cnblogs.com/lucongrui/articles/12963137.html
www.cnblogs.com/lucongrui/articles/12963130.html
www.cnblogs.com/lucongrui/articles/12963125.html
www.cnblogs.com/lucongrui/articles/12963118.html
www.cnblogs.com/lucongrui/articles/12963114.html
www.cnblogs.com/lucongrui/articles/12963110.html
www.cnblogs.com/lucongrui/articles/12963103.html
www.cnblogs.com/lucongrui/articles/12963099.html
www.cnblogs.com/wxy8/articles/12963233.html
www.cnblogs.com/wxy8/articles/12963230.html
www.cnblogs.com/wxy8/articles/12963220.html
www.cnblogs.com/wxy8/articles/12963215.html
www.cnblogs.com/wxy8/articles/12963207.html
www.cnblogs.com/wxy8/articles/12963202.html
www.cnblogs.com/wxy8/articles/12963196.html
www.cnblogs.com/wxy8/articles/12963193.html
www.cnblogs.com/wxy8/articles/12963189.html
www.cnblogs.com/wxy8/articles/12963184.html
www.cnblogs.com/wxy8/articles/12963176.html
www.cnblogs.com/wxy8/articles/12963169.html
www.cnblogs.com/wxy8/articles/12963161.html
www.cnblogs.com/wxy8/articles/12963152.html
www.cnblogs.com/wxy8/articles/12963146.html
www.cnblogs.com/wxy8/articles/12963142.html
www.cnblogs.com/wxy8/articles/12963139.html
www.cnblogs.com/wxy8/articles/12963134.html
www.cnblogs.com/wxy8/articles/12963129.html
www.cnblogs.com/wxy8/articles/12963123.html
www.cnblogs.com/wxy8/articles/12963117.html
www.cnblogs.com/wxy8/articles/12963113.html
www.cnblogs.com/wxy8/articles/12963109.html
www.cnblogs.com/wxy8/articles/12963101.html
www.cnblogs.com/wxy8/articles/12963096.html
www.cnblogs.com/sflhw/articles/12963234.html
www.cnblogs.com/sflhw/articles/12963227.html
www.cnblogs.com/sflhw/articles/12963221.html
www.cnblogs.com/sflhw/articles/12963213.html
www.cnblogs.com/sflhw/articles/12963205.html
www.cnblogs.com/sflhw/articles/12963201.html
www.cnblogs.com/sflhw/articles/12963194.html
www.cnblogs.com/sflhw/articles/12963190.html
www.cnblogs.com/sflhw/articles/12963185.html
www.cnblogs.com/sflhw/articles/12963177.html
www.cnblogs.com/sflhw/articles/12963173.html
www.cnblogs.com/sflhw/articles/12963167.html
www.cnblogs.com/sflhw/articles/12963158.html
www.cnblogs.com/sflhw/articles/12963150.html
www.cnblogs.com/sflhw/articles/12963145.html
www.cnblogs.com/sflhw/articles/12963140.html
www.cnblogs.com/sflhw/articles/12963133.html
www.cnblogs.com/sflhw/articles/12963128.html
www.cnblogs.com/sflhw/articles/12963124.html
www.cnblogs.com/sflhw/articles/12963119.html
www.cnblogs.com/sflhw/articles/12963115.html
www.cnblogs.com/sflhw/articles/12963111.html
www.cnblogs.com/sflhw/articles/12963105.html
www.cnblogs.com/sflhw/articles/12963098.html
www.cnblogs.com/cutman/articles/12963235.html
www.cnblogs.com/cutman/articles/12963225.html
www.cnblogs.com/cutman/articles/12963219.html
www.cnblogs.com/cutman/articles/12963212.html
www.cnblogs.com/cutman/articles/12963204.html
www.cnblogs.com/cutman/articles/12963197.html
www.cnblogs.com/cutman/articles/12963191.html
www.cnblogs.com/cutman/articles/12963186.html
www.cnblogs.com/cutman/articles/12963178.html
www.cnblogs.com/cutman/articles/12963168.html
www.cnblogs.com/cutman/articles/12963165.html
www.cnblogs.com/cutman/articles/12963156.html
www.cnblogs.com/cutman/articles/12963149.html
www.cnblogs.com/cutman/articles/12963138.html
www.cnblogs.com/cutman/articles/12963132.html
www.cnblogs.com/cutman/articles/12963127.html
www.cnblogs.com/cutman/articles/12963120.html
www.cnblogs.com/cutman/articles/12963116.html
www.cnblogs.com/cutman/articles/12963112.html
www.cnblogs.com/cutman/articles/12963106.html

猜你喜欢

转载自www.cnblogs.com/wxy8/p/12963262.html