The problem is as follows:
This error means that the dynamic link library file zlibwapi.dll cannot be found. zlibwapi.dll is the Windows version of the zlib library, and some Python packages depend on it on Windows.
About zlibwapi.all this file can be downloaded from NVIDIA official website, the link is: add link description
As shown below:
When downloading, just click save as, if you really can’t download it, download the package in my network disk: the link is: add link description
Link: https://pan.baidu.com/s/1v0E0Q3kpHv6ovZ7ZNIy0wg
Extraction code: irjk
After downloading the package, unzip it and add each file to the specified path, as follows:
The zlibwapi.lib file is placed in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\lib
The zlibwapi.dll file is placed in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\bin
After adding the package and running the code, you can solve the Could not locate zlibwapi.dll. Please make sure it is in your library path!