dereneaton / ipyrad

Interactive assembly and analysis of RAD-seq data sets
http://ipyrad.readthedocs.io
GNU General Public License v3.0
72 stars 41 forks source link

ipyrad.analysis cannot be imported as libsodium.23.dylib is missing #564

Closed AleixPalahi closed 3 months ago

AleixPalahi commented 4 months ago

Hi!

I intend to run STRUCTURE as implemented in ipyrad. I am currently working on a conda environment, using mamba to install the packages, and working on python 3.5.5. I have managed to install everything that is needed (ipyrad 0.9.81, structure 2.3.4, clumpp 1.1.2, toyplot 0.19.0), yet when I try running import ipyrad.analysis as ipa I get the following error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/ipyrad/__init__.py", line 4, in <module>
    from .core.assembly import Assembly, merge
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/ipyrad/core/assembly.py", line 22, in <module>
    from ipyrad.core.Parallel import Parallel
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/ipyrad/core/Parallel.py", line 20, in <module>
    import ipyparallel as ipp
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/ipyparallel/__init__.py", line 11, in <module>
    import zmq
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/__init__.py", line 47, in <module>
    from zmq import backend
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/backend/__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/utils/sixcerpt.py", line 34, in reraise
    raise value
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/backend/__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/backend/select.py", line 27, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: dlopen(/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/backend/cython/constants.cpython-35m-darwin.so, 0x0002): Library not loaded: '@rpath/libsodium.23.dylib'
  Referenced from: '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libzmq.5.dylib'
  Reason: tried: '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/backend/cython/../../../../../libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/python3.5/site-packages/zmq/backend/cython/../../../../../libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/lib/libsodium.23.dylib' (no such file), '/Users/AleixPalahi/miniforge3/envs/python3.5+ipyrad/bin/../lib/libsodium.23.dylib' (no such file), '/usr/local/lib/libsodium.23.dylib' (no such file), '/usr/lib/libsodium.23.dylib' (no such file)

I encounter the same error when I simply type ipyrad -h, which makes me think the problem arises from the installation of ipyrad and not from trying to use structure.

I have checked and indeed libsodium.23.dylib is missing, although libsodium.dylib and libsodium.26.dylib are present in the directory.

I have tried to update pyzmq and libsodium itself but they are, according to mamba, updated to the newest version already, so there's not much more I can do in that direction. I am a quite lost about what else to try to make it work. I have seen no issue in which this was discussed. Have you ever encountered this issue before and/or have some pointers on how to solve it?

Cheers, Aleix

isaacovercast commented 4 months ago

Hi Aleix,

Is there a reason to use the older versions of python (3.5) and ipyrad (0.9.81)? This is almost certainly a dependency/install issue. Could you try creating a new conda env with a newer version of python (like 3.9 or greater)? Like this:

conda create -n ipyrad_py39 python=3.9

Give it a try and let me know if it works.

isaacovercast commented 3 months ago

Is this working now? It seems like almost certainly a dependency issue, so a clean install of the most recent version should work. Please let me know if this is not the case.