3

I am trying to import msprime and on MacOS and I get the following traceback

Traceback (most recent call last):
  File "/usr/local/filename.py", line 1, in <module>
  import msprime
  File "/opt/anaconda3/lib/python3.9/site-packages/msprime/__init__.py", line 28, in <module>
from msprime._msprime import (
ImportError: dlopen(/opt/anaconda3/lib/python3.9/site-packages/msprime/_msprime.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_cblas_caxpy'

I had previously been getting the traceback:

ImportError: dlopen(/opt/anaconda3/envs/slim-workshop/lib/python3.10/site-packages/msprime/_msprime.cpython-310-darwin.so, 0x0002): Library not loaded: @rpath/libgsl.25.dylib 

So I used: ln -s libgsl.27.dylib libgsl.25.dylib

To create a symbolic link between libgsl.25.dylib and libgsl.27.dylib (which is the version of the library I have) as per:

dyld: Library not loaded: /usr/local/opt/gsl/lib/libgsl.23.dylib

I think this might be realted to the problem that I have but have otherwise no idea how what is happening or how to fix it so any help anyone can give me would be much appreciated.

Many thanks

joanis
  • 10,635
  • 14
  • 30
  • 40
Loosh
  • 31
  • 3

1 Answers1

0

I've had exactly the same problem when installing from conda. I uninstalled the conda version and used the pip version instead (pip install msprime) which worked for me.

Rob
  • 169
  • 7