Ubuntn 下搭建python人工智能环境
Ubuntn 下搭建python人工智能环境
为Python 3安装pip
sudo apt install python3-pip
检验是否安装 pip3 --version
安装用于构建Python模块所需的开发工具
sudo apt install build-essential python3-dev python3-setuptools
然后就可以pip3安装各种库了
安装CUDA Toolkit
在 CUDA Toolkit 的下载页面选择系统版本和安装方式,下载并运行 runfile。
下载CUDA Toolkit
wget https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run
安装CUDA Toolkit
sudo sh cuda_11.0.3_450.51.06_linux.run
安装好 CUDA Toolkit 后,屏幕上将输出:
Driver: Installed
Toolkit: Installed in /usr/local/cuda-10.1/
Samples: Installed in /home/abneryepku/
Please make sure that
- PATH includes /usr/local/cuda-10.1/
- LD_LIBRARY_PATH includes /usr/local/cuda-10.1/lib64, or, add /usr/local/cuda-10.1/lib64 to /etc/ld.so.conf and run ldconfig as root