ImportError after Miniconda install of 2017.9 through 2017.11 on OS X El Capitan

I installed release 2017.11 in its own conda environment on a Mac running OS X El Capitan (10.11.6):

conda create -n qiime2-2017.11 --file https://data.qiime2.org/distro/core/qiime2-2017.11-conda-osx-64.txt

I activated the environment:

source activate qiime2-2017.11

but when I run

qiime --help

I get:

QIIME is caching your current deployment for improved performance. This may take a few moments and should only happen once per deployment.
Traceback (most recent call last):
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 696, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 621, in make_context
    self.parse_args(ctx, args)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 1018, in parse_args
    rest = Command.parse_args(self, ctx, args)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 880, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 1404, in handle_parse_result
    self.callback, ctx, self, value)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 78, in invoke_param_callback
    return callback(ctx, param, value)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 809, in show_help
    echo(ctx.get_help(), color=ctx.color)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 496, in get_help
    return self.command.get_help(self)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 830, in get_help
    self.format_help(ctx, formatter)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 845, in format_help
    self.format_options(ctx, formatter)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 956, in format_options
    self.format_commands(ctx, formatter)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/click/core.py", line 1000, in format_commands
    for subcommand in self.list_commands(ctx):
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2cli/commands.py", line 69, in list_commands
    plugins = sorted(self._plugin_lookup)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2cli/commands.py", line 53, in _plugin_lookup
    import q2cli.cache
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2cli/cache.py", line 302, in <module>
    CACHE = DeploymentCache()
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2cli/cache.py", line 61, in __init__
    self._state = self._get_cached_state(refresh=refresh)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2cli/cache.py", line 107, in _get_cached_state
    self._cache_current_state(current_requirements)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2cli/cache.py", line 200, in _cache_current_state
    state = self._get_current_state()
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2cli/cache.py", line 238, in _get_current_state
    plugin_manager = qiime2.sdk.PluginManager()
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/qiime2/sdk/plugin_manager.py", line 44, in __new__
    self._init()
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/qiime2/sdk/plugin_manager.py", line 58, in _init
    plugin = entry_point.load()
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2402, in load
    return self.resolve()
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2408, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2_vsearch/plugin_setup.py", line 11, in <module>
    import q2_vsearch._cluster_features
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2_vsearch/_cluster_features.py", line 14, in <module>
    import biom
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/biom_format-2.1.6-py3.5-macosx-10.7-x86_64.egg/biom/__init__.py", line 51, in <module>
    from .table import Table
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/biom_format-2.1.6-py3.5-macosx-10.7-x86_64.egg/biom/table.py", line 177, in <module>
    import scipy.stats
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/scipy/stats/__init__.py", line 348, in <module>
    from .stats import *
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/scipy/stats/stats.py", line 175, in <module>
    import scipy.special as special
  File "/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/scipy/special/__init__.py", line 640, in <module>
    from ._ufuncs import *
ImportError: dlopen(/Users/greg/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/scipy/special/_ufuncs.cpython-35m-darwin.so, 2): Library not loaded: /usr/local/gfortran/lib/libquadmath.0.dylib
  Referenced from: /Users/greg/programs/tcoffee/Version_11.00.8cbe486/gfortran/libgfortran.3.dylib
  Reason: image not found

I followed up on a few suggestions, with no luck:

  • The installation instructions mention that gfortran-related errors can happen when using the wrong installation instructions, but I am following the instructions for “macOS/OS X (64 bit)”
  • Others have had problems installing release 2017.10 on OS X Mountain Lion (10.8), due to a problem with numpy. I don’t suspect a problem with numpy, which I use.
  • I deleted and reinstalled the release after cleaning and updating conda as suggested here.

Another note: I have a working conda installation of release 2017.8, which I installed in the same way. I’ve gone back to previous versions and this error begins with release 2017.9.

Has anyone been running these releases on El Capitan? If possible I was hoping to avoid upgrading OS X for the time being, as I have come to view each new OS X release as a minefield…

2 Likes

Hello @Gregory_P!

It looks like the program tcoffee has its own gfortran, which is somehow conflicting with the gfortran that should be installed in your QIIME 2 conda environment.

Just curious, did you happen to install tcoffee between 2017.8 and now?

My initial thought is that El Capitan isn’t the culprit here (I think one of our build machines is actually on El Capitan, but I can’t confirm that at the moment). Rather, I am leaning towards tcoffee being implicated here.

One test is to create a new user account on your Mac (or, if you have another available account without tcoffee installed, that would be ideal), and try out a Q2 install there.

Let us know if you get stuck, have any thoughts, or any additional questions. Good luck! :t_rex:

1 Like

I figured it out!

The last few lines of the error message seem to indicate that qiime is looking for libraries in a directory where I installed the multiple sequence alignment tool T-Coffee. There is no reason why it should be looking for libraries there (a directory having nothing to do with the conda environment where I installed Qiime2), so I looked around in my .bash_profile and found this line:

export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$DIR_4_TCOFFEE/gfortran"

I commented this out, opened a new terminal (to get a fresh set of environment variables), activated my conda environment for release 2017.11 of Qiime2, and now I get no error messages upon running qiime --help!

I think the moral of the story is that I should also have installed T-Coffee in its own separate environment to prevent this kind of conflict.

2 Likes

Thanks @thermokarst, you were right that it is an issue with tcoffee rather than El Capitan.

No, it looks like I installed tcoffee first and Qiime2 release 2017.8 later.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.