conda install cuda,conda安装使用

  conda install cuda,conda安装使用

  想用tensorflow的GPU版本,安装后

  如果出现“w tensor flow/stream _ executor/platform/default/DSO _ loader . cc:59]无法加载动态库‘cudart 64 _ 101 . dll’;dlerror:找不到cudart64_101.dll "

  该警告表明可能没有安装CUDA。你需要去下面的网站,看看你机器里的显卡驱动和tensorflow版本,确定你应该下载哪个版本的cudacudnn。

  3359 tensorflow . Google . cn/install/source https://docs . NVIDIA . com/cuda/cuda-toolkit-release-notes/index . html如果显卡驱动和tensor flow的版本有矛盾,很难确定cudacudnn。建议先在www.nvidia.com下载显卡驱动,使显卡驱动适应tensorflow的版本。

  确定要下载的版本后,您可以使用

  a cond install cuda toolkit=xx . xx . xx conda install cud nn安装。

  如果上述方法安装缓慢,您可以将其安装在

  https://repo.anaconda.com/pkgs/main/win-64/找到想要安装的文件的URL,然后用第三方下载工具下载到相应的目录下,然后在本地目录下运行以下命令直接安装。

  cond install cuda toolkit-9.0-1 . tar . BZ conda install cud nn-7 . 6 . 5-cuda 9.0 _ 0 . tar . bz2如果还是不能使用GPU,推荐以下方法:

  1.确定python版本3.7。

  2.安装张量流2.4.0

  使用pip install tensorflow==2.4.0命令。或者先下载文件。

  https://files . python hosted . org/packages/2f/45/68e 41 b 073 b 17 c 49 DC 9 f 02648 acfd 43 b 029072786 a 229465 c 27 e 9554 c 993 e/tensor flow-2 . 4 . 0-cp37-cp37m-win _ amd64 . whl重用命令:pip install tensor flow-2 . 4 . 0-cp37-cp37m-win _ amd64 . whl

  如果在此步骤中出现以下错误:

  不卸载“wrap”。这是一个安装了发行版的项目,我们不能准确地确定哪些文件属于它,这将导致只有部分卸载。您可以使用以下命令强制升级

  pip-u-ignore-installed wrap==1 . 12 . 13。安装cudatoolkit 11.0.221

  使用命令conda install cuda toolkit=11 . 0 . 221。

  或者先下载文件:https://repo . anaconda . com/pkgs/main/win-64/cudatoolkit-11 . 0 . 221-h74a 9793 _ 0 . tar . bz2

  然后使用命令conda installcudatoolkit-11 . 0 . 221-h74a 9793 _ 0 . tar . bz2。

  4.安装cudnn8.0

  这个要从nvidia网站下载。提供了网址(不保证什么都能下载)https://developer . NVIDIA . com/compute/machine-learning/cud nn/secure/8 . 1 . 0 . 77/11.2 _ 2021 01 27/cud nn-11.2-windows-x64-v 8 . 1 . 0 . 77.

  打开这个zip文件并

  复制下一堆。在anaconda安装目录下的include to \Library\include中的h文件;

  抄一堆。将jsdwn下的. dll文件保存到anaconda安装目录中的\Library\jsdwn下;

  复制下一堆。anaconda安装目录中lib\x64到\Library\lib\x64的lib文件;

  5.到目前为止,你可以使用GPU运行tensorflow。

郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。

留言与评论(共有 条评论)
   
验证码: