PyCharm can find CUDA but not the python

Had a similar problem as well.
Make sure your cuda version and server’s driver are compatible:
image

On linux you can easily see that by typing nvidia-smi on terminal.

I had to downgrade my pytorch installation, since I couldn’t update the driver (not sudo).