pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

Import Error: libiomp5.dylib #179

Closed jtamerius closed 6 years ago

jtamerius commented 6 years ago

Hey All,

I installed pymc using conda. Everything seemed to go fine, but I got the error below when I tried to import the library. I have found some info on this error online, but have not found a way to fix it for me. Any help would be appreciated.

Best, James

ImportError: dlopen(/Users/myname/anaconda3/envs/gdalenv/lib/python3.5/site-packages/pymc/flib.so, 2): Library not loaded: @executable_path/libiomp5.dylib
Referenced from: /Users/myname/anaconda3/envs/gdalenv/lib/python3.5/site-packages/pymc/flib.so
Reason: image not found
fonnesbeck commented 6 years ago

Seems to be a Fortran issue. I assume you are using macOS? I can't replicate this issue on my MacBoo Pro. Can you try installing from conda-forge?

conda install -c conda-forge pymc

Also, are you intending to install PyMC2? We recommend that most users install PyMC3, which is a different package (conda install pymc3).

jtamerius commented 6 years ago

Thanks for the speedy reply. First, I was not aware I was installing an old version of PyMC. So, I installed the new version using conda install condo-forge pymc3

This got rid of the original problem. However I now have two warnings when I import the library:

WARNING (theano.configdefaults): install mkl with `conda install mkl-service`: No module named 'mkl'
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

I followed the instructions on the first warning, i.e., I installed mlk-service using: conda install mkl-service

But, this completely broke import... Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.dylib.

fonnesbeck commented 6 years ago

Sorry about that. Can you try upgrading numpy and see if that helps: conda upgrade numpy

jtamerius commented 6 years ago

Thanks again for the speedy reply. I updated numpy, and the warning message has changed a bit but the first one is still there (along with deprecation warning):

WARNING (theano.configdefaults): install mkl with `conda install mkl-service`: No module named 'mkl'

/Users/myname/anaconda3/envs/gdalenv/lib/python3.5/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters

It seems to be working, though...

fonnesbeck commented 6 years ago

Yeah, don’t worry about the warning. It’s a known issue.