【Others】One-time solution to Pycharm's failure to load the cuda library

All the solutions I found online require setting in Run/Debug Configurations, which is annoying to do for every project.

You can avoid this by following the steps below, which only needs to be done once and will be effective for a lifetime.

Go to File -> Settings -> Environment variables and set it up as shown in the image below.


Sometimes, the above method may not work. In such cases, my solution is to enter the following command in the Terminal every time Pycharm starts:

sudo ldconfig /usr/local/cuda-10.0/lib64

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.