man-group / arctic

High performance datastore for time series and tick data
https://arctic.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
3.06k stars 584 forks source link

Import problem on macOS #538

Closed stnatter closed 6 years ago

stnatter commented 6 years ago

Arctic Version

current as of today (think 1.56)

Arctic Store

# VersionStore, TickStore, or ChunkStore

Platform and version

macOS High Sierra 10.13.4, conda, Python 3.6.5

Description of problem and/or code sample that reproduces the issue

from arctic import Arctic fails with the following traceback:

In [9]: from arctic import Arctic

ImportError Traceback (most recent call last)

in () ----> 1 from arctic import Arctic ~/miniconda3/lib/python3.6/site-packages/arctic/__init__.py in () 1 """ The Arctic TimeSeries and Tick store.""" 2 ----> 3 from .arctic import Arctic, register_library_type 4 from .arctic import VERSION_STORE, TICK_STORE, CHUNK_STORE 5 from .store.version_store import register_versioned_storage ~/miniconda3/lib/python3.6/site-packages/arctic/arctic.py in () 11 from .exceptions import LibraryNotFoundException, ArcticException, QuotaExceededException 12 from .hooks import get_mongodb_uri ---> 13 from .store import version_store, bson_store, metadata_store 14 from .tickstore import tickstore, toplevel 15 from .chunkstore import chunkstore ~/miniconda3/lib/python3.6/site-packages/arctic/store/version_store.py in () 13 ArcticException 14 from ..hooks import log_exception ---> 15 from ._pickle_store import PickleStore 16 from ._version_store_utils import cleanup 17 from .versioned_item import VersionedItem ~/miniconda3/lib/python3.6/site-packages/arctic/store/_pickle_store.py in () 5 from six.moves import cPickle, xrange 6 import io ----> 7 from .._compression import decompress, compress_array 8 import pymongo 9 ~/miniconda3/lib/python3.6/site-packages/arctic/_compression.py in () 1 import os 2 import logging ----> 3 from . import _compress as clz4 4 5 ImportError: dlopen(/Users/steffen/miniconda3/lib/python3.6/site-packages/arctic/_compress.cpython-36m-darwin.so, 2): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib Referenced from: /Users/steffen/miniconda3/lib/python3.6/site-packages/arctic/_compress.cpython-36m-darwin.so Reason: image not found Grateful for your help.
bmoscon commented 6 years ago

You need to install libomp (for openMP). Easiest way is to install homebrew and then install llvm. Instructions for homebrew are on its website (brew.sh). You can then install llvm with brew install llvm. There are other ways of course to install it. I found this via google and SO:

https://stackoverflow.com/questions/44380459/is-openmp-available-in-high-sierra-llvm/47230419?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

stnatter commented 6 years ago

brew install CLIUtils/apple/libomp did the trick. but not happy I had to install homebrew to get this done. Thanks very much!!!

bmoscon commented 6 years ago

agreed - but if the library isn't installed by default not really any choice but to install it. I also did mention you do not have to use homebrew to install it, but its definitely the easiest way

stnatter commented 6 years ago

thanks Bryant! one more beginners question: guess when i uninstall home-brew it also deletes libomp? Also i wanted to thank you guys for this amazing package. I do love its sheer simplicity. having said that i am likely going to use HDF5 files for my data store (for now) as thats even simpler and sufficient for my current needs. Should my needs change i know what to do ;-)