简体   繁体   中英

Importerror dlopen () symbol not found expected in flat namespace

I'm trying to install the SPAMS (SPArse Modeling Software) toolbox for python. The building and installing seem to be ok, but when I test the installation I get this error:

 ImportError: dlopen(/Users/Apollo/venv/lib/python2.7/site-packages/_spams_wrap.so, 2): Symbol not found: _GOMP_critical_end
  Referenced from: /Users/Apollo/venv/lib/python2.7/site-packages/_spams_wrap.so
  Expected in: flat namespace
 in /Users/Apollo/venv/lib/python2.7/site-packages/_spams_wrap.so

I checked all the answers but nothing worked and I'm stuck. I work on Mac OS X Lion 10.7.5, with virtual env, python 2.7.1, IDE PyCharm 5.0.6. The version of gcc is:

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

Following the suggestion of the AMICO (Accelerated Microstructure Imaging via Convex Optimization) Python package support forum, it was due to my gcc, which doesn't have openmp by default. Commenting few lines in the setup.py file did the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM