Error: mkl-service + Intel® MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library. Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.
试一下这个:
os.environ['MKL_THREADING_LAYER'] = 'GNU' `
可以分开试试,也可以一起
os.environ['MKL_SERVICE_FORCE_INTEL'] = '1'
如果还是不行,去这里找:
https://github.com/pytorch/pytorch/issues/37377