lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
234 stars 290 forks source link

Python classy module in Anaconda environment? #229

Open messyt opened 6 years ago

messyt commented 6 years ago

Hi,

Should the Python classy module that comes with CLASS be able to work in an Anaconda environment? I have Anaconda Python 3.6 as my default Python, but created a Python 2.7 environment with bumpy, scipy, cython, and matplotlib. I tried using classy, but it didn't work, and I'm not sure if it's supposed to not work or it can work and I'm just doing something wrong.

Thank you!

messyt commented 6 years ago

FYI, I'm getting this error message when I import class in the Python 2.7 environment:

import classy Traceback (most recent call last): File "", line 1, in ImportError: dlopen(/anaconda3/envs/python2/lib/python2.7/site-packages/classy.so, 2): Symbol not found: _GOMP_parallel Referenced from: /anaconda3/envs/python2/lib/python2.7/site-packages/classy.so Expected in: flat namespace in /anaconda3/envs/python2/lib/python2.7/site-packages/classy.so

ThomasTram commented 6 years ago

Hi

The wrapper should work with Anaconda yes. If you are on MacOS, perhaps you are seeing this issue: https://github.com/lesgourg/class_public/issues/208 In any case, you should check that before compilation, python is aliased to the correct Python that you want to use, or alternatively write PYTHON=XXX make -j where XXX is the Python you want to use.

Cheers, Thomas