[NOTE: I am not deleting my answer on purpose, so people see how not to do it]
If you use:
me@over_there:~$ dpkg --status nvidia-current | grep Version | cut -f 1 -d '-' | sed 's/[^.,0-9]//g'
260.19.06
you will get the version of the nVIDIA driver package installed through your distribution's packaging mechanism. But this may not be the version that is actually running as part of your kernel right now.
Also, I found this thread researching powershell. Here is an example command that runs the utility to get the true memory available on the GPU to get you started.
returns result as a string that doesn't require further parsing like: 470.82.00
In case nvidia-smi is not available for some reason, information can be obtained by calling into driver APIs.
Driver libraries can be loaded using Python ctypes library.