第一部分:人工智能基础环境搭建(Liunx系统)
这些题目都是在虚拟机下创建的,虚拟机的CentOs7下载与配置请看我的上一期文章
Vmware虚拟机的搭建Linux CentOS7-CSDN博客
一、Anaconda版本选择
地址:下载 Anaconda Distribution |蟒蛇
1、版本根据自己的python版本找对应的(以下只是一部分)
2.下载完成后是这样的一个文件,并把它传入到虚拟机中
2、Anaconda(Linux命令行进行的操作)
1.执行安装命令:
[root1@10 opt]# chmod +x Anaconda3-2021.05-Linux-x86_64.sh
[root1@10 opt]# ./Anaconda3-2021.05-Linux-x86_64.sh
Welcome to Anaconda3 2021.05
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
2.按ENTER
继续,一路回车键继续,直到
Do you accept the license terms? [yes|no]
[no] >>>
Please answer 'yes' or 'no':'
3.输入yes
,继续
Anaconda3 will now be installed into this location:
/root/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/root1/anaconda3] >>>
4.按ENTER
继续,默认Anaconda安装/root1/anaconda3
目录下,接下来就是解压安装的过程。
Do you accept the license terms? [yes|no]
[no] >>>
Please answer 'yes' or 'no':'
5.输入yes
,继续
Thank you for installing Anaconda3!
===========================================================================
6.这时关闭终端,再打开终端会在前面显示(base)表示安装成功,以后终端会默认打开在conda环境
(base) [root1@10 ~]#
3、验证环境
(base) [root1@10 ~]# conda -V
conda 4.9.2
输入python -V 可以查看Python版本
(base) [root1@10 ~]# python -V
Python 3.8.5
二、代码执行部分
1、版本的验证
import torch
import sys
import sklearn
import cv2
print('Python version Info::'+ sys.version)
print('PyTorch version Info:'+torch.__version__)
print('PyTorch version Info:'+cv2.__version__)
print('PyTorch version Info:'+format(sklearn.__version__))
感谢您的观看。