简体   繁体   English

TensorFlow-gpu 安装与 Anaconda

[英]Tensorflow-gpu installation with Anaconda

This weekend I have been trying a lot to install and get Tensorflow with GPU support to work on my computer, but I am not very experienced in using pip/conda and are now quite confused after watching and trying a lot of different tutorials/approaches from the web.这个周末我一直在尝试安装并获得支持 GPU 的 Tensorflow以在我的计算机上工作,但我在使用 pip/conda 方面不是很有经验,在观看并尝试了很多不同的教程/方法后,我现在很困惑web。

I have a GeForce GTX 1650 graphics card, and I have installed Cuda 10.0 (also 11.2, but I removed it from "PATH" and are only using the 10.0 version, I don't think that's a problem).我有一个GeForce GTX 1650显卡,我已经安装了Cuda 10.0 (也是 11.2,但是我从“PATH”中删除了它并且只使用了 10.0 版本,我认为这不是问题)。

I have downloaded cuDNN 7.5.0 for CUDA 10 , and I think that I have copied and placed the files correctly (installed cuDNN).我已经为 CUDA 10 下载了 cuDNN 7.5.0 ,并且我认为我已经正确复制并放置了文件(安装了 cuDNN)。

I am just trying to get some version of Tensorflow-gpu to work, but you can see the Tensorflow version i have been trying for now on the image.我只是想让一些版本的 Tensorflow-gpu 工作,但你可以在图像上看到我现在一直在尝试的 Tensorflow 版本。

I have tried to install and uninstall Python from my computer (I've also reinstalled Anaconda a lot of times), because I am not sure if I need to have a Python version installed (on my system) if I install a version of Python inside my Anaconda environment (in my example Python 3.7 ). I have tried to install and uninstall Python from my computer (I've also reinstalled Anaconda a lot of times), because I am not sure if I need to have a Python version installed (on my system) if I install a version of Python在我的 Anaconda 环境中(在我的示例中为 Python 3.7 )。

Does anyone know how to install Tensorflow GPU on Windows 10 with my settings (cuDNN 7.5.0, CUDA 10), or maybe have encountered some trouble with Python versions or Anaconda problems similar to mine? Does anyone know how to install Tensorflow GPU on Windows 10 with my settings (cuDNN 7.5.0, CUDA 10), or maybe have encountered some trouble with Python versions or Anaconda problems similar to mine?

在此处输入图像描述

Follow these steps to install Tensorflow GPU on windows system.按照以下步骤在 windows 系统上安装 Tensorflow GPU。

  1. Make sure right version of Visual studio is installed.确保安装了正确版本的 Visual Studio。 Check here . 在这里检查。

  2. Follow the instructions mentioned here to setup CUDA for windows system按照此处提到的说明为 windows 系统设置 CUDA

  3. Install Tensorflow安装Tensorflow

 #check current python version python --version #Create the virtual environment conda create -n tf python=PYTHON_VERSION #Activate the tf environment conda activate tf #Install Tensorflow pip install tensorflow #Install CUDA and cuDNN using conda and make sure CUDA and cuDNN version should match the Tensorflow version conda install -c anaconda cudatoolkit=10.0 cudnn=7.5

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM