diffpy installation on macOS — incompatible library issue

204 views
Skip to first unread message

Dimitry Grebenyuk

unread,
Mar 15, 2021, 2:11:33 AM3/15/21
to diffpy-users
Dear all,

I installed diffpy-cmi on a Mac (macOS 11.1, M1) using anaconda with python 3.7 as instructed in the installation guide. The installation seemed to be successful, but when I now try to run my refinement script, some error with the library occurs:

Traceback (most recent call last):
  File "./fit_one_cluster_Dimitry_MZ.py", line 37, in <module>
    cdsePDF.addStructure("CdSe", cdseStructure, periodic=False)
  File "/Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/python3.7/site-packages/diffpy.srfit-3.0.0-py3.7.egg/diffpy/srfit/pdf/pdfcontribution.py", line 186, in addStructure
    gen = DebyePDFGenerator(name)
  File "/Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/python3.7/site-packages/diffpy.srfit-3.0.0-py3.7.egg/diffpy/srfit/pdf/debyepdfgenerator.py", line 113, in __init__
    from diffpy.srreal.pdfcalculator import DebyePDFCalculator
  File "/Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/python3.7/site-packages/diffpy/srreal/pdfcalculator.py", line 29, in <module>
    from diffpy.srreal.srreal_ext import DebyePDFCalculator
ImportError: dlopen(/Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/python3.7/site-packages/diffpy/srreal/srreal_ext.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libgslcblas.0.dylib
  Referenced from: /Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/libdiffpy.dylib
  Reason: Incompatible library version: libdiffpy.dylib requires version 1.0.0 or later, but libcblas.3.dylib provides version 0.0.0

I tried to explicitly install libdiffpy with 

conda install -c conda-forge libdiffpy 

and the output changed to 

Traceback (most recent call last):
  File "./fit_one_cluster_Dimitry_MZ.py", line 37, in <module>
    cdsePDF.addStructure("CdSe", cdseStructure, periodic=False)
  File "/Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/python3.7/site-packages/diffpy.srfit-3.0.0-py3.7.egg/diffpy/srfit/pdf/pdfcontribution.py", line 186, in addStructure
    gen = DebyePDFGenerator(name)
  File "/Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/python3.7/site-packages/diffpy.srfit-3.0.0-py3.7.egg/diffpy/srfit/pdf/debyepdfgenerator.py", line 113, in __init__
    from diffpy.srreal.pdfcalculator import DebyePDFCalculator
  File "/Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/python3.7/site-packages/diffpy/srreal/pdfcalculator.py", line 29, in <module>
    from diffpy.srreal.srreal_ext import DebyePDFCalculator
ImportError: dlopen(/Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/python3.7/site-packages/diffpy/srreal/srreal_ext.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libopenblas.dylib
  Referenced from: /Users/dimitrygrebenyuk/opt/anaconda3/envs/py37/lib/libdiffpy.dylib
  Reason: image not found

Installation with other versions of python gives the same error; installation from sources with macports didn't succeed; searching google or this group also didn't help.

Thanks in advance for any hints.


Dimitry 

ali dordaee

unread,
Mar 15, 2021, 3:43:54 PM3/15/21
to diffpy-users
Hi Dimitry,
 Have you checked your working environment? It is a very common problem. You must work in py37 environment which already whould be activated using conda. 

Reply all
Reply to author
Forward
0 new messages