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)
230 stars 285 forks source link

Error when importing classy #416

Closed rodrigovonmarttens closed 3 years ago

rodrigovonmarttens commented 3 years ago

I've installed CLASS following all the instructions, but when I try to import classy on python, it returns the following error message:

Traceback (most recent call last): File "", line 1, in ImportError: dlopen(//opt/anaconda3/lib/python3.8/site-packages/classy.cpython-38-darwin.so, 2): Symbol not found: _background_at_tau Referenced from: //opt/anaconda3/lib/python3.8/site-packages/classy.cpython-38-darwin.so Expected in: flat namespace in //opt/anaconda3/lib/python3.8/site-packages/classy.cpython-38-darwin.so

Does anyone knows how to fix that please?

ShazAlvi commented 3 years ago

Hi, if I am to make a guess some package has not been installed. Have you installed all the required packages? Also, make sure that you compile CLASS in the conda environment that you are using (I am judging by the path that you are working in a conda environment).

On Mon, Apr 26, 2021 at 5:45 AM Rodrigo von Marttens < @.***> wrote:

I've installed CLASS following all the instructions, but when I try to import classy on python, it returns the following error message:

Traceback (most recent call last): File "", line 1, in ImportError: dlopen(//opt/anaconda3/lib/python3.8/site-packages/ classy.cpython-38-darwin.so, 2): Symbol not found: _background_at_tau Referenced from: //opt/anaconda3/lib/python3.8/site-packages/ classy.cpython-38-darwin.so Expected in: flat namespace in //opt/anaconda3/lib/python3.8/site-packages/classy.cpython-38-darwin.so

Does anyone knows how to fix that please?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lesgourg/class_public/issues/416, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD5PLWGIEJ7BPPENDX5L4LTKTOUHANCNFSM43SATEMQ .

rodrigovonmarttens commented 3 years ago

Many thanks, @ShazAlvi !

Actually, I've been able to solve this issue by pointing out the gcc installed with brew in the gcc entry on the Makefile.