Compatibility issues - Tensorflow, cuda, cudnn, and alienware M16 w/ Geforce RTX 4070 GPU

To be upfront, I am a PhD student who knows the basics of how to use python. I am not a developer. Given that, I need to use tensorflow and other python packages, and I keep getting failures when running the python script that say tensorflow does not recognize or see the GPU when I test it in python. So, it limits its performance based on the CPU cores only. Here is the python code I use to see if it is working…

import tensorflow as tf
from tensorflow.python.client import device_lib

print(“TensorFlow version:”, tf.version)
print(“Available devices:”, device_lib.list_local_devices())
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices(‘GPU’)))

I am trying to extract the data from a pdf, which is actually the pdf of an image provided to me from the SEC. So, I cannot change the data file and the SEC is unresponsive. To do this task, I am using optical readers to generate the data output, and I post process it to generate the dataframe. Prior extractions yield very scrambled data that are unusable. Here are examples of the packages I have or am using.

Here are some of the packages I am trying to use.

What I have tried previously

import PyPDF2 as pypdf
import pdfplumber as plum
from PIL import Image
import pandas as pd
import pytesseract
from pdf2image import convert_from_path

What I am using now

import easyocr
from pdf2image import convert_from_path
import pandas as pd
import numpy as np
from PIL import Image
import re

The second method goes line by line, so the errors are better. However, it requires tensorflow, which has compatibility issues with current versions of nvidia drivers and cuda (12.5). My hope is someone may be able to help me identify the problem and resolve the compatibility issues. Nvidia customer support told me they cannot help me resolve the issue and pointed me here.

What I know after having wiped everything and reinstalled different versions several times is that the 4070 GPU driver requires a certain version of cuda (and supporting versions of cudnn registry files) to be compatible. The most recent 4070 driver 555.99 supports CUDA 12.5 and cudnn 8.9.5 12.x. However, tensorflow is not compatible with this version of CUDA. Nvidia customer support first suggested I run a GPU driver of 527.41 and cuda 12.0. I tried and the installer told me that the driver was not compatible with the current version of windows and the graphics driver could not find compatible graphics hardware. I have also tried to install an old gpu driver 537.58 for the RTX 4070 and the installer reported the same problems.

At this point, I am stuck, and I cannot move forward on my own. I feel like my next move is get a different computer that has older hardware and drivers. Can someone please help me?

Thank you!