Problems while setting up the conda environment/ cannot find libffi

Skip to first unread message

David Nothdurfter

May 8, 2020, 5:18:11 AM5/8/20
to cmtk-users


sorry for the many questions, but I also have an issue when installing the Connectome Mapper - I am getting an error message while setting up the conda environment:

(base) Davids-MBP-3:Applications mynotebook$ conda env create -f connectomemapper3/environment.yml
Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Ran pip subprocess with arguments:
[u'/opt/miniconda2/envs/py27cmp-gui/bin/python', '-m', 'pip', 'install', '-U', '-r', '/Applications/connectomemapper3/tmp2JfN7s.requirements.txt']
Pip subprocess output:

Pip subprocess error:
Traceback (most recent call last):
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/", line 16, in <module>
    from pip._internal import main as _main  # isort:skip # noqa
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/_internal/", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/_internal/cli/", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/_internal/cli/", line 12, in <module>
    from pip._internal.commands import (
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/_internal/commands/", line 6, in <module>
    from pip._internal.commands.completion import CompletionCommand
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/_internal/commands/", line 6, in <module>
    from pip._internal.cli.base_command import Command
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/_internal/cli/", line 20, in <module>
    from import PipSession
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/_internal/", line 37, in <module>
    from pip._internal.utils.glibc import libc_ver
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/site-packages/pip/_internal/utils/", line 3, in <module>
    import ctypes
  File "/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/ctypes/", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: dlopen(/opt/miniconda2/envs/py27cmp-gui/lib/python2.7/lib-dynload/, 2): Library not loaded: @rpath/libffi.6.dylib
  Referenced from: /opt/miniconda2/envs/py27cmp-gui/lib/python2.7/lib-dynload/
  Reason: image not found

CondaEnvException: Pip failed

I have already tried reinstalling libffi with homebrew and renaming the libffi.7.dylib file to libffi.6.dylib in my conda environment and in /usr/local, however it seems that the program cannot find the libffi.6.dylib file.

Has anyone any ideas how to fix this issue?

Thanks in advance,

Reply all
Reply to author
0 new messages