#在装有RTX3090显卡的机器上配置深度学习环境的步骤如下
1.创建环境
conda create -n you_env_name
2.安装pytorch
conda install pytorch torchvision cudatoolkit=11.3 -c pytorch
检查cuda是否可用
python
print(torch.cuda.is_available())
注意:如果指定pytorch版本,需要跟cudatoolkit的版本匹配,否则装上后的pytorch只支持cpu
例如,使用如下的方式安装pytorch
conda install pytorch=1.7.1 torchvision torchaudio cudatoolkit=11.3 -c pytorch
安装好后检查cuda是否可用print(torch.cuda.is_available())
发现只能用CPU.
因此要特别注意pytorch的版本。指定cuda版本后可以安装默认版本的pytorch。
3. tqdm进度条包
conda install -c conda-forge tqdm
4. 画图工具
conda install matplotlib
5. h5py是Python语言用来操作HDF5的模块.安装命令
conda install -c anaconda h5py
6. scikit-image (a.k.a. skimage) is a collection of algorithms for image processing and computer vision. skimage包的安装命令如下
conda install scikit-image
6. Cython
conda install cython