[英]Intel MKL error using Conda and matplotlib: "Library not loaded: @rpath/libiomp5.dylib" on macOS
I'm using a conda environment for a project and when I install matplotlib I get the following error when attempting to run python:我正在为项目使用 conda 环境,当我安装 matplotlib 时,尝试运行 python 时出现以下错误:
(conda environment path)/bin/python (Project path)/src/__init__.py
INTEL MKL ERROR: dlopen((conda environment path)/lib/libmkl_intel_thread.dylib, 9): Library not loaded: @rpath/libiomp5.dylib
Referenced from: (conda environment path)/lib/libmkl_intel_thread.dylib
Reason: image not found.
Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.dylib.
I've looked everywhere for a solution, and it seems like the vast majority of similar issues have been on windows, with no accepted solution for macOS.我到处寻找解决方案,似乎绝大多数类似问题都出现在 windows 上,没有适用于 macOS 的解决方案。 It looks like it seems to be an issue with my
DYLD_LIBRARY_PATH
environment variable, which is currently empty.看起来这似乎是我的
DYLD_LIBRARY_PATH
环境变量的问题,该变量当前为空。 If that is the case I don't know how to populate it.如果是这种情况,我不知道如何填充它。
I had the same issue.我遇到过同样的问题。 Something broke when I install pytorch, which I think must've updated or changed some of the MKL libraries.
当我安装 pytorch 时出现问题,我认为它必须更新或更改了一些 MKL 库。
I tried the solution proposed in the comments (kudos to @cel) by trying to install llvm-openmp but it didn't immediately work because the package was already installed.我通过尝试安装 llvm-openmp 尝试了评论中提出的解决方案(对@cel 表示敬意),但它并没有立即起作用,因为 package 已经安装。 However, one further step fixed the issues at my end (forcing a reinstall).
但是,又一步解决了我的问题(强制重新安装)。
conda install -c conda-forge llvm-openmp --force-reinstall
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.