How do I install TensorFlow 2.2 with Nvidia Geforce GTX 1650 with Anoconda (on Windows 10)
I want to know whether this anaconda command will work instead of manually installing all the required files like CUDA toolkit, CUdnn and TensorRT (for TensorFlow version 2.2 GPU).
$conda create Test Tensorflow-gpu==2.1
$conda activate Test
$pip3 install Tensorflow-gpu==2.2
Note: I will manually download the GPU driver as recommended on tensorflow official website!
I do pip3 install tensorflow-gpu (for version 2.2) because as per TensorFlows Official website both 2.1 & 2.2 use the same CUDA & cuDNN version.
Right now it looks like Anaconda's highest version of Tensorflow is 2.1. If you want 2.2 you'll need to install tensorflow gpu, cuda, and cudnn manually.
Related
I installed the CUDA toolkit and CUDNN and added it to the PATH, but this function still returns False.
import tensorflow as tf
print(tf.test.is_built_with_cuda())
I use JupyterNotebook from the Anaconda distribution.
The OS is Windows 11. CUDA v11. CUDNN v8.7. Also have zlib dll.
The command
nvcc -V
in PowerShell works, it outputs the CUDA version.
TensorFlow also does not detect the graphics card because of CUDA.
print(tensorflow.config.list_physical_devices())
This code returns information only about CPU.
You need to install CUDA 11.2 and cuDNN 8.1 as per this build configurations to enable Tensorflow GPU support in your system.
Please install all the required software for GPU support and set the PATH for these software to the bin directory.
Then use below code for TF-gpu setup in conda environment.
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
pip install --upgrade pip
# Anything above 2.10 is not supported on the GPU on Windows Native
pip install "tensorflow-gpu<2.11"
To verify the GPU setup:
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
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.
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).
I have downloaded cuDNN 7.5.0 for CUDA 10, and I think that I have copied and placed the files correctly (installed 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.
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).
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.
Make sure right version of Visual studio is installed. Check here.
Follow the instructions mentioned here to setup CUDA for windows system
Install 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
Which is the command to see the "correct" CUDA Version that pytorch in conda env is seeing? This, is a similar question, but doesn't get me far.
nvidia-smi says I have cuda version 10.1
conda list tells me cudatoolkit version is 10.2.89
torch.cuda.is_available() shows FALSE, so it sees No CUDA?
print(torch.cuda.current_device()), I get 10.0.10 (10010??) (it
looks like):
AssertionError: The NVIDIA driver on your system is too old
(found version 10010)
print(torch._C._cuda_getCompiledVersion(), 'cuda compiled version') tells me my version is 10.0.20 (10020??)?
10020 cuda compiled version
Why are there so many different versions? What am I missing?
P.S
I have Nvidia driver 430 on Ubuntu 16.04 with Geforce 1050. It comes
with libcuda1-430 when I installed the driver from additional drivers tab in ubuntu (Software and Updates). I installed pytorch
with conda which also installed the cudatoolkit using conda install -c fastai -c pytorch -c anaconda fastai
In the conda env (myenv) where pytorch is installed do the following:
conda activate myenv
torch.version.cuda
Nvidia-smi only shows compatible version. Does not seem to talk about the version pytorch's own cuda is built on.
I am trying to install Tensorflow 2.2 (or later) in Windows 10. According to the official Tensorflow instalation guide, Python 3.8 support requires TensorFlow 2.2 or later. I installed Anaconda with python 3.8 and then tried to install tensorflow using conda install -c anaconda tensorflow but it displays 2 errors:
My Python version is not compatible (although the tensorflow page says the contrary).
My CUDA version is 11.0 (but I installed the 10.1 version as specified in the tensorflow installation guide).
In this picture I show the message errors
Additionally I tried using only conda install tensorflow but it displays the same messages as before.
I also tried doing the installation both inside and outside the enviroment I created named sstensorflow but it doesn't work.
Regarding the second error message, I used nvcc --version to check the installed version of the CUDA driver and it says it is version 10.1 as shown in this picture.
So I don't know why my computer admits having CUDA 10.1 but when trying to install tensorflow it says I have CUDA 11.0 and also I don't know what is the error regarging my python version. Please help me.
I had a similar problem. Had to go back to python 3.7. Other issue is that when it says
Your installed version is 11.0 I believe it is referring to your GPU card driver not the CUDA version. I had to find a driver version compatible with CUDA 10.1. I have an RTX 2070 GPU and the driver version I have is 26.21.14.3200. GO to the Nvidia site and search for a driver for your GPU card that is compatble with CUDA 10.1
I have recently ran:
apt-get update
apt-get upgrade
on Ubuntu 18.04. I noticed that it upgraded some nvidia related packages.
After the upgrade tensorflow has slowed down extremely. Before the upgrade training a test network took 75 seconds and now that takes about 15 minutes.
My versions:
cuda 10.0
nvidia driver 415.27
Cuda compilation tools release 9.1, V9.1.85
In tensorflow conda env:
cudatoolkit 9.2
cudnn 7.2.1
python 3.6.8
tensorflow/tensorflow-base/tensorflow-gpu 1.12.0
I have tried many things to fix this including new conda environment just for tensorflow, other gpu drivers (390, 410), re-installing gpu drivers.
I don't know how to find the root of the problem. I am using a gtx 1080ti. Is there some kind of benchmark I can run?
I tried to run the tensorflow cnn benchmark but that requires tf_nightly_gpu which doesn't support cuda 10.0 yet.