# PyCall Issues with MKL

**URL:** <https://discourse.julialang.org/t/pycall-issues-with-mkl/62354>\
**Category:** General Usage\
**Tags:** python\
**Created:** [June 3, 2021, 8:09pm UTC](https://discourse.julialang.org/t/pycall-issues-with-mkl/62354 "2021-06-03T20:09:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gideonsimpson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gideonsimpson/32/1928_2.png) [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Post date:** [June 3, 2021, 8:09pm UTC](https://discourse.julialang.org/t/pycall-issues-with-mkl/62354/1 "2021-06-03T20:09:07Z")

</div>

I want to call a tiny bit of Python code that makes use of some FEniCS code, so I tried adding `PyCall` and building it against the (conda) Python environment on my system for which I have FEniCS working. However, this ends up not working, and, in fact, anything that relies on PyCall (i.e., PyPlot) then seems to break:

```julia
julia> using PyPlot
INTEL MKL ERROR: dlopen(/Users/gideonsimpson/miniconda3/lib/libmkl_intel_thread.1.dylib, 9): Library not loaded: @rpath/libiomp5.dylib
  Referenced from: /Users/gideonsimpson/miniconda3/lib/libmkl_intel_thread.1.dylib
  Reason: image not found.
Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.1.dylib.

```

Anyone have any advice on how to resolve this? I find that if I blow away my `.julia` folder, and reinstall `PyPlot` _without_ changing `ENV["PYTHON"]`, I at least can restore `PyPlot` functionality.

---

<div class="post-metadata">

**Author:** ![gideonsimpson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gideonsimpson/32/1928_2.png) [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Post date:** [June 4, 2021, 3:06am UTC](https://discourse.julialang.org/t/pycall-issues-with-mkl/62354/2 "2021-06-04T03:06:14Z")

</div>

As an addendum, the issue seems to be the `Numpy` installation and how its linked against `MKL`. FEniCS is a nightmare to install properly, and I’m leery of monkeying with it. Does anyone have a recipe with how, once I have a Python installation working the way I want, to get `PyCall` to interface with it properly?
