- 用anaconda作为虚拟环境的管理工具,pycharm在建立工程时,调用anaconda的虚拟环境即可。
- 在一个虚拟环境安装过cuda和cudnn之后,
在另一个虚拟环境中安装cuda和cudnn方法:
(mxnet) yuyang@oceanshadow$ conda install cudatoolkit=9.0 Collecting package metadata: done Solving environment: done ## Package Plan ## environment location: /home/yuyang/anaconda3/envs/mxnet added / updated specs: - cudatoolkit=9.0 The following NEW packages will be INSTALLED: cudatoolkit pkgs/main/linux-64::cudatoolkit-9.0-h13b8566_0 Proceed ([y]/n)? y Preparing transaction: done Verifying transaction: done Executing transaction: done
安装cudnn:
(mxnet) yuyang@oceanshadow:$ conda install cudnn Collecting package metadata: done Solving environment: done ## Package Plan ## environment location: /home/yuyang/anaconda3/envs/mxnet added / updated specs: - cudnn The following NEW packages will be INSTALLED: cudnn pkgs/main/linux-64::cudnn-7.3.1-cuda9.0_0 Proceed ([y]/n)? y Preparing transaction: done Verifying transaction: done Executing transaction: done
- 其他所需要的包用pip安装即可。
文章来源: https://blog.csdn.net/weixin_39451323/article/details/90747597