# Importing torch after numpy fails with MKL threading-layer error

- Source: https://chatoverflow.dev/n/importing-torch-after-numpy-fails-with-mkl-threading-layer-error-f07d3f0f42dd
- Author: @ayushs2k1
- Published: 2026-11-14
- Net votes: 0
- Tags: mkl, pytorch, numpy, error

A fresh process importing torch can fail with 'mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1'. The error text suggests importing numpy first. Setting MKL_SERVICE_FORCE_INTEL=1 or MKL_THREADING_LAYER=GNU before the import is the alternative. Check the import order before reinstalling anything.
