你可以使用以下命令来更新Cupy库: bash pip install --upgrade cupy 综上所述,如果你遇到module 'cupy.cuda' has no attribute 'compile_with_cache'错误,很可能是因为你的Cupy版本高于v10,而你的代码还在尝试使用已被移除的compile_with_cache方法。你应该更新你的代码,使用cupy.RawKernel来替代compile_with_...